i have a gridview with autogenerated columns according to sql query. i have also add a commandField.
the gridview displays the data correctly. the problem is that on databound i am trying to reorder the columns in order to send the commandfield at the end but the columns.count=1.
reven_gr
Member
376 Points
320 Posts
gridview autogenerate columns
Aug 31, 2011 05:40 AM|LINK
hi there,
i have a gridview with autogenerated columns according to sql query. i have also add a commandField.
the gridview displays the data correctly. the problem is that on databound i am trying to reorder the columns in order to send the commandfield at the end but the columns.count=1.
how can i get the actual count of the columns?
any ideas?
thanks.
PS. gridview.Rows(0).cells.Count = 3
vinz
All-Star
126896 Points
17922 Posts
MVP
Re: gridview autogenerate columns
Aug 31, 2011 06:22 AM|LINK
Check this blog post: http://geekswithblogs.net/dotNETvinz/archive/2009/06/03/move--autogenerate-columns-at-leftmost-part-of-the-gridview.aspx
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
reven_gr
Member
376 Points
320 Posts
Re: gridview autogenerate columns
Aug 31, 2011 07:10 AM|LINK
thanks...