471,049 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

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 1335

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.