Bound DataGrid.Columns.Count = 0

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have successfully bound a DataGrid on Web Form (i.e. it shows the data
properly in the browser). It looks like there are 4 columns of data, but
when I retrieve DataGrid.Columns.Count in the Page_Load event (after
binding), it returns 0. Why?
 
Yes. Apparently, this occurs when you have AutoGenerateColumns=TRUE. It
kind of seems like a bug.

Dan

Alvin Bruney said:
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Dan said:
I have successfully bound a DataGrid on Web Form (i.e. it shows the data
properly in the browser). It looks like there are 4 columns of data, but
when I retrieve DataGrid.Columns.Count in the Page_Load event (after
binding), it returns 0. Why?
 
Back
Top