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

Hiding or making it un-checkable options of columns menu in Context Menu on Radgrid

0 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vijay
Top achievements
Rank 1
vijay asked on 15 Sep 2017, 06:53 PM

Hi ,

We are using radgrid menu and we don't want users to un-check all columns from columns menu of context menu.

Is there a way to hide or stop user unchecking some columns of columns menu item?

I tried this below code:

  void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
        {
                     if (e.Item.Value.Contains("Reference#") && e.Item.Controls.Count > 0)
                (e.Item.Controls[0] as CheckBox).Enabled = false;
        }

It will make readonly for that column option on first load, but once i un-check another column, it will get enabled for check/uncheck.

Is there any other way to achieve this?

Thanks

No answers yet. Maybe you can help?

Tags
Grid
Asked by
vijay
Top achievements
Rank 1
Share this question
or