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

Reduce the height of the Filter pop up in Excel Like Filtering

1 Answer 149 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Wasim
Top achievements
Rank 1
Wasim asked on 12 Oct 2017, 09:49 AM

I have a RadGrid control with Excel like filtering which will populate the values on demand. I want to reduce the height of the filter pop up and remove the (contains,equal to,...) dropdown from the pop up.

I used the below code to remove the dropdowns(HCFMRCMBFirstCond  and HCFMRCMBSecondCond ). But I was getting javascript error and my filter doesn't work.

void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
{
     foreach (Control c in e.Item.Controls)
     {
         RadComboBox combo = c as RadComboBox;
         if (combo != null)
         {
             if(combo.Items.Count == 16)
             {
                combo.Visible = false;
             }
         }
     }
 }

 

I used the following code to reduce the filter pop up height.

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
 {
     if (e.Item is GridFilteringItem)
     {
         GridFilteringItem item = (GridFilteringItem)e.Item;
         item.Height = Unit.Pixel(100);
     }
 }

But doesn't seem to work.

I want to have only the Wild card Search box and the filterlist items on my filter with reduced filter pop up height. How could I do this? Please help!

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Oct 2017, 03:39 PM
Hello,

You can see how to perform more precise cleaning of the context menu items both on the server and/or the client in this code library:

http://www.telerik.com/support/code-library/conditionally-hide-controls-from-excel-like-filtering-menu.

The following help article elaborates how to access the HeaderContextMenu items and manipulate them

Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Filter
Asked by
Wasim
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or