Hidinig and unhiding datagrid columns

  • Thread starter Thread starter jack
  • Start date Start date
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
 
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
 
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

Back
Top