GridView

G

Guest

Hi everyone,
I have a gridView, and I give to one of it's boundColumns property of
"visible=false".
I don't want it to be shown in client side, but I want it's values to be
recognized in server side.
It is realy not shown in client side, but when I post-back, and asking about
that column values, I get "" , like it is empty. (When it is "visible=true"
it is fine - there are values in it).
What can I do ?
I know that one of the solutions is to get it back to "visible=true", and to
hide it in DHTML. But as it works fine with "visible=false" in a DataGrid, I
guess it should work also in GridView. Maybe there is something that I don't
know about it...
Thanks a lot ! ! !
in GridView.
 
E

Eliyahu Goldin

Server controls with Visible set to false don't get rendered to the client.
Naturally, they don't come back in postbacks either. If you are interested
in the values on postbacks, you should keep Visible=true and hide controls
with css rule display:none.
 
G

Guest

Dear Eliyahu,
Since it is possible to get the data of BoundColumn in DataGrid while
Posting-Back,
I guessed it is possible in GridView eather. I Guess now it is impossible in
GridView.
Anyways, I did what you suggested, and it works perfect.
Thanks a lot my friend !

Eliyahu Goldin said:
Server controls with Visible set to false don't get rendered to the client.
Naturally, they don't come back in postbacks either. If you are interested
in the values on postbacks, you should keep Visible=true and hide controls
with css rule display:none.

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


moshi said:
Hi everyone,
I have a gridView, and I give to one of it's boundColumns property of
"visible=false".
I don't want it to be shown in client side, but I want it's values to be
recognized in server side.
It is realy not shown in client side, but when I post-back, and asking
about
that column values, I get "" , like it is empty. (When it is
"visible=true"
it is fine - there are values in it).
What can I do ?
I know that one of the solutions is to get it back to "visible=true", and
to
hide it in DHTML. But as it works fine with "visible=false" in a DataGrid,
I
guess it should work also in GridView. Maybe there is something that I
don't
know about it...
Thanks a lot ! ! !
in GridView.
 

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

Top