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

Default Header Context Menu Column Selections to Unselected

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 21 Jan 2009, 06:18 PM
Hello,

I am currently unilizing the header context menu radgrid functionality introduced with the Q3 release. The only way that I found to default a column to unselected in the menu and therefore hide it in the grid is to use the Display="false" tag on the GridBoundColumn. The side effect I am experiencing from this is once the user selects to show a column that has the tag Display="false", the column appears but then after closing the menu and reopening it that column is unselected once again. The column is unselected in the menu even though the column is visible in the grid. Is there a better way I should be doing this? Thanks for any direction you can provide.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 26 Jan 2009, 09:24 AM
Hi Ryan,

The context menu will reflect the state of the column at run time. For example, if a column is rendered with display="false", it will be unchecked in the menu. Since the menu is rendered dynamically in accordance with the columns in the control, and the state of the columns, you will need to alter the state of the column on the server, to ensure the value is reflected in the context menu in a consistent manner.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or