Excel-like Filtering

3 posts, 0 answers
  1. Brew Hutch
    Brew Hutch avatar
    56 posts
    Member since:
    Apr 2010

    Posted 29 Oct 2015 Link to this post

    Hello,

    I'm following this sample to have the excel-like filtering on my grid view. I'm wondering if I could hide some options in the herder context menu like Group By, Ungroup, and Columns.

     Is there a way?

     

    Thanks,

    Brew

     

  2. Brew Hutch
    Brew Hutch avatar
    56 posts
    Member since:
    Apr 2010

    Posted 29 Oct 2015 Link to this post

    Sorry ..forgot a link to a sample

    http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/excel-like-filtering/defaultcs.aspx

     ​

  3. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 30 Oct 2015 Link to this post

    Hi,

    Try the approach presented bellow:

    private void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
    {
        RadContextMenu menu = RadGrid1.HeaderContextMenu;
     
        switch ((e.Item.Text)) {
            case "Group By":
                e.Item.Visible = false;
                break;
            case "Ungroup":
                e.Item.Visible = false;
                break;
            case "Columns":
                e.Item.Visible = false;
                break;
        }
    }



    Regards,
    Maria Ilieva
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top