[2005] gridview col visible =false
i am populating a gridview control using its datasource property.
visible prop of one of the columns of the gridview control is set false
now on reading values from this hidden column , empty string is returned " ".
my code :
textbox1.text= mygrid.rows(0).cells(0).text
it gives correct result if column is visible.
but if i apply same code to datagrid control , it works fine.
any suggestions
thanks.
Re: [2005] gridview col visible =false
When a column is visible, you can read the data from it. Else you can't.
Re: [2005] gridview col visible =false
Quote:
Originally Posted by mendhak
When a column is visible, you can read the data from it. Else you can't.
thats horrible then. something which is available in datagrid ( .net 1.1) , it is not in gridview ( .net 2.0)
i use hidden columns for my ids .
Re: [2005] gridview col visible =false
Ok i got my answer. my apologies. i take my previous reply back.
answer lies in DataKeyNames.
http://forums.asp.net/897693/ShowPost.aspx