This is a migrated thread and some comments may be shown as answers.

Column Hiding/Unhiding

2 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Appu
Top achievements
Rank 1
Appu asked on 30 Jun 2009, 04:43 PM
Hi ..
     Is there any option to hide column programmatic way. I need to be done column hiding whenever i click hide button as well as unhide button. So i could know that column hiding is possible if u know the column name which you want to hide in prior.

My question is suppose we have number of columns grid and i want to hide and unhide any column which i prefer.

Plz help me for this

Appu 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 01 Jul 2009, 04:44 AM
Hello Appu,

To hide/show a column programatically on button click, you have to use the column UniqueName or the column index. So you would have to pass either the columnUniqueName or the index of the column you wish to hide or show. If this is not what you are looking for , please explain a bit more of your entire scenario for instance where the buttons are placed, etc.

Also, you can make use of the HeaderContextMenu to hide or show columns on the client. Take a look at the following demo which demonstrates on this feature.
Header Context Menu

Thanks
Princy.
0
Appu
Top achievements
Rank 1
answered on 01 Jul 2009, 07:44 AM
Hi
       This HeaderContextMenu helps me a lot in hiding and unhiding column. But one thing whenever i hide any of column the grid or mastertable view width should not readjust according to number of columns presenting. As a result of this it shows blank area at the right portion of the Grid. So i cannot readjust sizes in case of hiding/unhiding column. I should not occupy the space.

Note: I am using scroll bar and set the grid width to 2000px and mastertableview width to 100%, also i  adjust the some column width according to my preference.

Is there any possible way. to get an exact view of Grid when hide/unhide done


 

Regards,
Appu
Tags
Grid
Asked by
Appu
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Appu
Top achievements
Rank 1
Share this question
or