Getting filtered values with Excel-like filtering checked list

3 posts, 1 answers
  1. François
    François avatar
    5 posts
    Member since:
    Jan 2012

    Posted 21 Jun 2017 Link to this post

    Hello,

    I would like to change the css of my filtered columns. I use the following code:

    if (e.CommandName == RadGrid.HeaderContextMenuFilterCommandName)
    {
    Triplet arguments = e.CommandArgument as Triplet;
    Pair filter1 = arguments.Second as Pair;
    Pair filter2 = arguments.Third as Pair;
    GridColumn column = (sender as RadGrid).MasterTableView.GetColumn(arguments.First.ToString());
    if (filter1.First.ToString() == "NoFilter" && filter2.First.ToString() == "NoFilter")
    column.ItemStyle.CssClass = "";
    else
    column.ItemStyle.CssClass = "rgFilterClass";
    }

     

    This works well if I use the two filter fields of the context menu, but if I only choose elements from the filter checked list of my context menu, it's not working. :(

    How can I access the "filter checked list" of my "header context menu" from my code-behind? Or is there another way to know that my columns are filtered with the "filter checked list"?

     

    Thank you for your help,

        

  2. Answer
    Eyup
    Admin
    Eyup avatar
    4075 posts

    Posted 26 Jun 2017 Link to this post

    Hi François,

    You can use the approach demonstrated in the attached web site sample to achieve this requirement.
    I hope this will prove helpful.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. François
    François avatar
    5 posts
    Member since:
    Jan 2012

    Posted 26 Jun 2017 Link to this post

    Thank you very much Eyup, it works perfectly!!
Back to Top