got it.
didnt have the autogeneratecolumns property set right
good article describes the solution:
http://www.c-sharpcorner.com/Code/20...ridColDyna.asp
"klynn" wrote:
> I queried a series of fields from a database and passed into a datatable.
> Then bound this to a datagrid. I need to hide 2 of the colums. This doesnt
> seem to be working the standard way. (with datagrid columns hide). When I
> query for number of columns in datagrid I always get 0 no matter what, even
> after showing all the columns. I must dynamically build the table after page
> post (I pass in parameters to define the table I'll be querying) so I dont
> know the columns up front. Any ideas?