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

2 posts, 0 answers
  1. Wasim
    Wasim avatar
    1 posts
    Member since:
    Oct 2017

    Posted 12 Oct Link to this post

    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!

     

  2. Rumen
    Admin
    Rumen avatar
    13278 posts

    Posted 16 Oct Link to this post

    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.
Back to Top