Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET 2.0: GridView, autogeneratecolumns="true" is not working

Reply
Thread Tools

ASP.NET 2.0: GridView, autogeneratecolumns="true" is not working

 
 
Sachin
Guest
Posts: n/a
 
      03-05-2006
Hi All,

I am using ASP.NET 2.0 and GridView control.

I have a stored procedure, SP_GetAllRows which takes the table name as
parameter and fires the query "Select * from TableName" dynamically.

My GridView defined like,


<asp:gridview id="CustomersGridView"
datasourceid="CustomersSource"
autogeneratecolumns="true"
emptydatatext="No data available."
allowpaging="true"
runat="server">


In the code behinde file, I set the datasource and call databind.

However, gridview does not display any records even when the stored
procedure returns the rows.
I have verified this through debugger. In fact, when no records are returned
it does display the message, "No data avaialable".

I changed the GridView to DataGrid, but it does not work also.

If I use bound columns and explicitely specify the column name it does work.

However, as store procedure returns the records from different tables at run
time, I am using autogeneratecolumns="true".

What could be wrong?

Why autogeneratecolumns="true" is not working?

Any pointer or help?

TIA
Sachin


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
response.redirect is not working but server.transfer is working gaurav tyagi ASP .Net 14 01-20-2006 04:22 AM
wifi not working on new hp, or not working after live update =?Utf-8?B?RHJhZ29ueA==?= Wireless Networking 1 10-01-2005 11:17 PM
ASP.NET client-side validation working, but button click not working Alan Silver ASP .Net 1 08-02-2005 03:50 PM
Cookies working on intranet but NOT working on Internet Martin Heuckeroth ASP .Net 5 04-01-2005 01:37 AM
Regular Expression validators NOT working, Required Field validators ARE working Ratman ASP .Net 0 09-14-2004 09:36 PM



Advertisments