|
-
Jan 10th, 2007, 07:08 AM
#1
Thread Starter
Fanatic Member
[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.
Last edited by vishalmarya; Jan 13th, 2007 at 07:00 AM.
Reason: resolved
-
Jan 10th, 2007, 09:55 AM
#2
Re: [2005] gridview col visible =false
When a column is visible, you can read the data from it. Else you can't.
-
Jan 13th, 2007, 06:43 AM
#3
Thread Starter
Fanatic Member
Re: [2005] gridview col visible =false
 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 .
-
Jan 13th, 2007, 06:59 AM
#4
Thread Starter
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|