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

GridFilterMenu

2 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 2
Richard asked on 27 Oct 2008, 05:37 PM
I was following your posted example on adding a FilterAll button to the GridHeaderTemplate.  I was wondering if it is possible to add a button the the FilterMenu instead that would perform the same functionality?

I can't seem to find a way to add an item to the Gridfilter menu.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Oct 2008, 04:14 AM
Hi Richard,

Try the following code snippet to add a button in the Filtermenu.

CS:
protected void Page_Init(object sender, System.EventArgs e) 
    { 
 
        RadMenuItem menuItem = new RadMenuItem(); 
        Button btn = new Button(); 
        btn.ID = "FilterButton"
        btn.Text = "FilterAll"
        menuItem.Controls.Add(btn); 
       RadGrid1.FilterMenu.Items.Add(menuItem); 
    } 


Thanks
Shinu.
0
Richard
Top achievements
Rank 2
answered on 28 Oct 2008, 12:41 PM
Thank you for your response Shinu.  I used the code you supplied.  I see that it adds the menu item to the FilterMenu collection, but the button doesn't appear anywhere on the Filter Menu.  Is there another setting I should be aware of?

Tags
Grid
Asked by
Richard
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Richard
Top achievements
Rank 2
Share this question
or