Hidinig and unhiding datagrid columns

J

jack

Hi,

Is it possible to hide and unhide the columns of datagrid during the
runtime. With javascript without posting back to the server.



Thanks for replying me
 
E

Eliyahu Goldin

Yes. You will need to write a function that will find all cells of the
column and set for them style.display="none". You can also set the className
property to a class with the css rule display:none. If you know in advance
which columns you will want to hide, you can assign to the cells distinct
CssClass property. Then on client side you would just need to change the css
display rule for the class.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
J

jack

But this would be applicable if the grid is in the table.
What i talking about is DataGrid control's columns. Is it possible to
hide the column of the datagrid control.


Thanks for replying me.
 

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
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top