HighTechTalks DotNet Forums  

Get value if invisible

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Get value if invisible in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
ghostwolf
 
Posts: n/a

Default Get value if invisible - 08-02-2006 , 05:15 AM






Hi,

I'm using the asp:gridview control for displaying the data from SQL Server.
Now, I've found that if the column is invisible
"<asp:BoundField DataField="some_id" HeaderText="some_id"
SortExpression="some_id" Visible="false"/>", I cannot get the value from
that column (just get the null string by "GridView1.Rows[1].Cells[0].Text".



Thanks.



Regards,





Reply With Quote
  #2  
Old   
Eliyahu Goldin
 
Posts: n/a

Default Re: Get value if invisible - 08-02-2006 , 07:45 AM






Web controls with Visible=false don't get sent to client. Hide them rather
with css style display:none.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"ghostwolf" <ylkam (AT) roctec (DOT) com.hk> wrote

Quote:
Hi,

I'm using the asp:gridview control for displaying the data from SQL
Server. Now, I've found that if the column is invisible
"<asp:BoundField DataField="some_id" HeaderText="some_id"
SortExpression="some_id" Visible="false"/>", I cannot get the value from
that column (just get the null string by
"GridView1.Rows[1].Cells[0].Text".



Thanks.



Regards,







Reply With Quote
  #3  
Old   
ghostwolf
 
Posts: n/a

Default Re: Get value if invisible - 08-03-2006 , 03:54 PM



Thanks, how can I add this property to the particular column?

"Eliyahu Goldin" <removemeegoldin (AT) monarchmed (DOT) com> wrote

Quote:
Web controls with Visible=false don't get sent to client. Hide them rather
with css style display:none.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"ghostwolf" <ylkam (AT) roctec (DOT) com.hk> wrote in message
news:ugaj$QhtGHA.2260 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Hi,

I'm using the asp:gridview control for displaying the data from SQL
Server. Now, I've found that if the column is invisible
"<asp:BoundField DataField="some_id" HeaderText="some_id"
SortExpression="some_id" Visible="false"/>", I cannot get the value from
that column (just get the null string by
"GridView1.Rows[1].Cells[0].Text".



Thanks.



Regards,









Reply With Quote
  #4  
Old   
ghostwolf
 
Posts: n/a

Default Re: Get value if invisible - 08-03-2006 , 04:03 PM



especially in a ASP.NET page.

"ghostwolf" <ylkam (AT) roctec (DOT) com.hk> wrote

Quote:
Thanks, how can I add this property to the particular column?

"Eliyahu Goldin" <removemeegoldin (AT) monarchmed (DOT) com> wrote in message
news:ePOxAEitGHA.4336 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
Web controls with Visible=false don't get sent to client. Hide them
rather with css style display:none.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"ghostwolf" <ylkam (AT) roctec (DOT) com.hk> wrote in message
news:ugaj$QhtGHA.2260 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Hi,

I'm using the asp:gridview control for displaying the data from SQL
Server. Now, I've found that if the column is invisible
"<asp:BoundField DataField="some_id" HeaderText="some_id"
SortExpression="some_id" Visible="false"/>", I cannot get the value from
that column (just get the null string by
"GridView1.Rows[1].Cells[0].Text".



Thanks.



Regards,











Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.