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

Excel-like Filtering

2 Answers 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brew Hutch
Top achievements
Rank 1
Brew Hutch asked on 29 Oct 2015, 02:46 PM

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 Answers, 1 is accepted

Sort by
0
Brew Hutch
Top achievements
Rank 1
answered on 29 Oct 2015, 02:47 PM

Sorry ..forgot a link to a sample

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

 ‚Äč

0
Maria Ilieva
Telerik team
answered on 30 Oct 2015, 01:04 PM
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
Tags
Grid
Asked by
Brew Hutch
Top achievements
Rank 1
Answers by
Brew Hutch
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or