Disable Excel-Like filtering for certain columns only

2 posts, 1 answers
  1. Joe Sugden
    Joe Sugden avatar
    52 posts
    Member since:
    Feb 2010

    Posted 19 Jan 2011 Link to this post


    We have a gird with Excel-Like filtering enabled.
    Is there a way to disable the Excel-Like filtering for certain columns only? For example, in some cases with many different dollar values in a column, it doesn't really make sense for the user to be able filter based on specific values only, not to mention that there is some kind of a rounding bug where you would check only one value in the list and it won't display any rows...
    We still want to keep the old style filtering capabilities because they make more sense for some columns and disable only the Excel-Like functionality...
    Again, we need to be able to do that on per column basis, not for the grid as a whole.

    See screenshot for more details

    Thanks in advance.

  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 19 Jan 2011 Link to this post

    Hello Joe,

    Currently, you cannot choose which columns which filter types go to, but you can have either Standard Filtering, Excel-Like Filtering or indeed both. Please consider the follwoing code

    Me.RadGridView1.EnableFiltering = True
    '// 1 Excel like filtering            
    Me.RadGridView1.MasterTemplate.ShowHeaderCellButtons = True
    Me.RadGridView1.MasterTemplate.ShowFilteringRow = False
    '// 2 Standard Filtering
    Me.RadGridView1.MasterTemplate.ShowHeaderCellButtons = False
    Me.RadGridView1.MasterTemplate.ShowFilteringRow = True
    '// 3 Both Standard AND Excel like filtering
    Me.RadGridView1.MasterTemplate.ShowHeaderCellButtons = True
    Me.RadGridView1.MasterTemplate.ShowFilteringRow = True

    Hope that helps
Back to Top