Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GridView AutoGenerateColumns not working

1 view
Skip to first unread message

Aamir Ghanchi

unread,
Oct 10, 2007, 2:53:09 PM10/10/07
to
Hello,

I would like to hear if any one else is having the same problem. The
AutoGenerateColumns property is set to true. I can read the data right
and can loop through the datasource's columnscollection and get the
row count, but for some reasons the gridview does not get autopoulated
with the results. The Gridview is bound to objectdatasource and I can
see all the events firing as follows when I trace:
objdsCourseMatrix_Selecting
objdsCourseMatrix_Selected
gvCourseMatrix_DataBinding
gvCourseMatrix_DataBound
This was originally a .Net 1.1 project imported now into 2.0
Any ideas will be appreciated.

thanks.

Aamir Ghanchi

unread,
Oct 11, 2007, 9:09:47 AM10/11/07
to
Answering my own post for the benefit of others.
The default value of AutoGenerateColumns property of gridview is true
as it shows up in the proprty window, but my suggestion is : Don't
count on it.
I manually added the AutoGenerateColumns attribute in the asp:GridView
element on the html page and its is now showing all the returned
columns without . I don't know how long it will stay there as it gets
reset (removes) from the html code when I do other changes to the
gridview or switch back & forth between the designer and the source.

IfThenElse

unread,
Oct 11, 2007, 11:05:29 AM10/11/07
to
Thank you for sharing


"Aamir Ghanchi" <aamirg...@gmail.com> wrote in message
news:1192108187.2...@57g2000hsv.googlegroups.com...

0 new messages