Excel-like available filter off

4 posts, 0 answers
  1. Вадим
    Вадим avatar
    21 posts
    Member since:
    Mar 2016

    Posted 16 Feb 2018 Link to this post

    How on some columns to disconnect available filter?
    And in the first column, leave only containce?
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3993 posts

    Posted 19 Feb 2018 Link to this post

    Hello, Вадим, 

    Thank you for writing.  

    You can enable the filtering functionality for the whole RadGridView but disable it only for specific columns by setting the AllowFiltering property of the column: 

    this.radGridView1.Columns[3].AllowFiltering = false;



    I hope this information helps. Should you have further questions I would be glad to help. 
     
     Regards,
    Dess
    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.
  3. Вадим
    Вадим avatar
    21 posts
    Member since:
    Mar 2016

    Posted 19 Feb 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    You did not understand me.
    In the third column, I need to leave only the enumeration of cities (hide the "available filter").

    In the first column, put the default "contains".

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3993 posts

    Posted 20 Feb 2018 Link to this post

    Hello, Вадим,  

    Thank you for writing back. 

    The provided clarification is greatly appreciated. You can handle the FilterPopupInitialized and hide the desired items in the RadListFilterPopup. Here is demonstrated how to hide the "Available Filters" menu item: 


    private void radGridView1_FilterPopupInitialized(object sender, Telerik.WinControls.UI.FilterPopupInitializedEventArgs e)
    {
        RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
        if (popup != null)
        {
            foreach (RadItem item in popup.Items)
            {
                if (item.Text== Telerik.WinControls.UI.Localization.RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.FilterMenuAvailableFilters))
                {
                    item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                }
            }
        }
    }

    Following a similar approach you can hide all the items you wish.

    I hope this information helps. If you have any additional questions, please let me know. 

     Regards,
    Dess
    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