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

1 posts, 0 answers
  1. vijay
    vijay avatar
    1 posts
    Member since:
    May 2017

    Posted 15 Sep 2017 Link to this post

    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?


Back to Top