Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
WebDataGrid auto generated column count is zero.
posted

The WebDataGrid columns are auto generated in code.  I want to count the columns

int 

 

 

columnCnt = HunterDistributorWebDataGrid.Columns.Count;

after WebDataGrid.DataBind();  It returned zero.  The columns count works for bound column.  I also tried to hide a column but it didn't work.

HunterDistributorWebDataGrid.Columns[0].Hidden =

 

true;

How do I count the auto generated columns?  Thanks.