468,549 Members | 2,145 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,549 developers. It's quick & easy.

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

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"
emptydatatext="No data available."
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?

Mar 5 '06 #1
0 1270

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jonathan Wood | last post: by
3 posts views Thread by nick chan | last post: by
reply views Thread by hhoang.nl | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.