Hiding EditCommandColumn from HeaderContextMenu

6 posts, 0 answers
  1. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 13 Sep 2013 Link to this post

    Hi,

    I have a RadGrid with a EditCommandColumn. In the headercontextmenu this column can be hidden when I choose Columns (see screenshot). How can I hide this column from the headercontextmenu?

    Paul
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 13 Sep 2013 Link to this post

    Hello,

    Please try with the below link.

    http://www.telerik.com/community/forums/aspnet-ajax/grid/hide-columns-in-header-context-menu-for-column.aspx

    Let me know if any concern.

    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 13 Sep 2013 Link to this post

    This is not the solution.
    In the headercontextmenu of the other columns you can indicate which columns must be shown of hidden (see screenshot I attached in the original post). The editcolumn is shown there. I don't want this column to be hidden.

    Paul
  5. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 13 Sep 2013 Link to this post

    Hello,

    Please try with the below code snippet.

    function OnHeaderMenuShowing(sender, eventArgs) {
                   eventArgs.get_menu().findItemByText("EditCommandColumn").set_visible(false);
               }

    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                  </telerik:GridEditCommandColumn>
    <ClientSettings>
              <ClientEvents OnHeaderMenuShowing="OnHeaderMenuShowing" />
          </ClientSettings>


    Thanks,
    Jayesh Goyani
  6. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 13 Sep 2013 Link to this post

    No. As you see in the screenshot the item 'EditCommandColumn' is a subitem of the item 'Columns'.
    So, this does not work.
  7. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 16 Sep 2013 Link to this post

    Hello,

    Can you please provide your (aspx page) code ?

    Thanks,
    Jayesh Goyani
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017