Get value if invisible

G

ghostwolf

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,
 
E

Eliyahu Goldin

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

ghostwolf

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

Eliyahu Goldin said:
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 said:
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,
 
G

ghostwolf

especially in a ASP.NET page.

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

Eliyahu Goldin said:
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 said:
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top