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

Custom RadListFilterPopup > Add new RadMenuItem

2 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Grégory
Top achievements
Rank 1
Grégory asked on 31 Aug 2015, 04:25 PM

Hi,

I need to customize the filter popup to add some new choices.

I've tried to add item this way :

        private void radGrid_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e)
        {
            var popUp = e.FilterPopup as RadListFilterPopup;
            if (popUp == null)
                return;

            var rmiSortByColor = new RadMenuItem("Sort by color");
            popUp.Items.Insert(0, rmiSortByColor);​

            [...]

  

Unfortunally, as you can see in the provided screenshot, the item is very huge, and the height increase proportionally when I resize the popup.

I have the exact same problem when I add a simple separator.

 

Did I miss something ?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 02 Sep 2015, 07:34 AM
Hi Gregory,

Thank you for writing.

You should just set the StretchVertically property of the item to false:
void radGridView1_FilterPopupInitialized(object sender, Telerik.WinControls.UI.FilterPopupInitializedEventArgs e)
{
    RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
    if (popup != null)
    {
        var rmiSortByColor = new RadMenuItem("Sort by color") { StretchVertically = false };
        popup.Items.Insert(0, rmiSortByColor);​
    }
}

Please let me know if there is something else I can help you with. 

Regards,
Dimitar
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
0
Grégory
Top achievements
Rank 1
answered on 02 Sep 2015, 09:25 AM
Thank you so much, it works fine !
Tags
GridView
Asked by
Grégory
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Grégory
Top achievements
Rank 1
Share this question
or