Filtering UI confusing in some cases

22 posts, 0 answers
  1. erwin
    erwin avatar
    400 posts
    Member since:
    Dec 2006

    Posted 22 Jan 2009 Link to this post


    While filtering is a very useful feature, it tends to confuse my test users in some cases, mostly in combination with other powerful features of the grid:

    - If a filter is set and the column then hidden by the user, there is no visual indication of an active filter. This can be especially confusing in combination with the SaveLayout()/ LoadLayout() feature.

    - On boolean columns there is no easy way to distinguish between a clear filter and an unchecked checkbox.

    On my prototype application I have therefore implemented a 'Clear all Filters' Button, that is only enabled if any filters are set. In addition to indicate the filtering, clear all filters might be a useful standard function (for example in the context menu) of the grid.

    Regards
    Erwin
     
  2. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 23 Jan 2009 Link to this post

    Hello erwin,

    Thank you for the feedback.

    All the suggestions are valuable for us. We will take them in consideration when working on the future versions of the RadGridView. I have updated your telerik points.

    Feel free to write us if you have any questions.

    All the best,
    Jack
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Prad
    Prad avatar
    35 posts
    Member since:
    Apr 2008

    Posted 26 Jan 2009 Link to this post

    Hi Erwin,

        If a filter is set and the column then hidden by the user, there is no visual indication of an active filter. This can be especially confusing in combination with the SaveLayout()/ LoadLayout() feature.
       - Explicit coding can be done on the UI to indicate if the column is filtered. Example: color the column when filtered.

    **Make use fo cellformating event.


    if (e.CellElement.ColumnInfo is GridViewDataColumn)  
                    {  
                        for (int i = 0; i < rgvResult.MasterGridViewTemplate.FilterExpressions.Count; i++)  
                        {  
                            for (int j = 0; j < rgvResult.MasterGridViewTemplate.FilterExpressions[i].Parameters.Count; j++)  
                            {  
                                if (((GridViewDataColumn)e.CellElement.ColumnInfo).FieldName ==  
                                        rgvResult.MasterGridViewTemplate.FilterExpressions[i].FieldName)  
                                {  
                                    if (rgvResult.MasterGridViewTemplate.FilterExpressions[i].Parameters[j].Value != null)  
                                    {  
                                        if (rgvResult.MasterGridViewTemplate.FilterExpressions[i].Predicates[0].Function != GridKnownFunction.NoFilter)  
                                        {  
                                            if (!(e.CellElement is GridHeaderCellElement))  
                                            {  
                                                e.CellElement.DrawFill = true;  
                                                e.CellElement.NumberOfColors = 1;  
                                                ee.CellElement.BorderBottomColor = e.CellElement.BackColor = System.Drawing.Color.Beige;  
                                            }  
                                        }  
                                        else  
                                        {  
                                            if (!(e.CellElement is GridHeaderCellElement))  
                                                e.CellElement.DrawFill = false;  
                                        }  
                                    }  
                                    else  
                                    {  
                                        if (!(e.CellElement is GridHeaderCellElement))  
                                            e.CellElement.DrawFill = false;  
                                    }  
                                }  
                                break;  
                            }  
                        }  
                    }  
     
    ///Event  
      private void CallFormatCell(RadGridView rgvResult, CellFormattingEventArgs e)  
            {  
                FormatCell(rgvResult, e);  
            } 

    Hope this helps till Telerik comes up with blink.

    Regards

    Pradeep

  4. erwin
    erwin avatar
    400 posts
    Member since:
    Dec 2006

    Posted 27 Jan 2009 Link to this post

    Thanks for the sample code Pradeep.

    Regards
    Erwin



  5. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 28 Jan 2009 Link to this post

    Your feedback is greatly appreciated, Pradeep. We will take it into consideration when implementing this feature in RadGridView. I have updated your Telerik points.

    Please do not hesitate to write us if you have any questions.

     
    Greetings,
    Jack
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Alcatraz
    Alcatraz avatar
    15 posts
    Member since:
    Mar 2010

    Posted 26 Apr 2010 Link to this post

    Hi Telerik Team,

    I go with Erwin's query and even had the same requirement in my application where in the user need to be indicated whether any filter is applied for any column.  Infact as per my requirement, the user feels comfortable to see a colored funnel when a filter is applied and an empty funnel icon if its not applied.

    Currently am using the latest version (2010 SP1) and could you please confirm whether you have included any attribute or event in gridview such that I can achieve this.

    Please help me out on this.

    Thanks
    Krishnan N
  7. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 27 Apr 2010 Link to this post

    Hello KrisYs,

    This is not possible with the current version of RadGridView. We plan to add such a property in our upcoming Q2 2010 release.

    Kind regards,
    Jack
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. Prad
    Prad avatar
    35 posts
    Member since:
    Apr 2008

    Posted 27 Apr 2010 Link to this post

    Krishnan,
     You could color the header in cellFormatting event (for sorted/filtered scenario). Hope if that helps you though..

    prad
  9. erwin
    erwin avatar
    400 posts
    Member since:
    Dec 2006

    Posted 27 Apr 2010 Link to this post

    The filtering UI caused a lot of support questions with my users.
    The checkbox/boolean column filter is more intuitive in 2010Q1 where the checkbox is now not shown if no filter set.
    But there is still room for improvement for the filter UI.

    In my app, I have derived a grid control from the original grid which provies a context menu and button to clear all filters.
    These controls are only enabled, if a filter is set, so the user has direct feedback on active filters.

    Plus I always display the total amount of records in the datasource and the amount of visible records. This helped a lot in reducing support questions such as "I can't see my data anymore".

    Regards
    Erwin
  10. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 29 Apr 2010 Link to this post

    Hi Erwin, thank you for your feedback.

    Please, feel free to share your project with the community. I think it will be helpful and we will appreciate that. We will add a property which indicates whether filtering is applied on a column in one of our upcoming releases.

     

    Best wishes,
    Jack
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  11. Eric
    Eric avatar
    24 posts
    Member since:
    Jul 2011

    Posted 01 Jun 2012 Link to this post

    I would like to second the request of Prad regarding the ability to problematically set the funnel to colored.  I also wanted to expand on that.  Similar to Erwin and other's observations, our users are also perplexed with the filtering.  First, let me explain our situation.  We have the ability to filter our dialog using a "saved view".  This saved view is used to control the data that is fed into the grid.  For performance reasons, we do not simply pull down the entire data set and then use the grid to filter.  I'm imagining this is a common scenario among the dev community.

    So because of this, and the fact that in our saved views we allow the user to filter down on any particular column, when this saved view data is loaded into the grid, it will be pre-filtered if you will.  Therefore, the column filter is not colored or showing of a filter applied in any way, because of course from the grid's perspective there is no filter.  

    So what would be ideal is the following in order of importance
    1. Ability to just set a flag on the column that visually indicates it is filtered (even if the user cannot see the filter... it's still a help)
    2. At the bottom of the list, some button or other UI control to indicate the user can click and retrieve more values.  This would trigger an even we could catch and then allow us to populate a complete list of values that we retrieved from the database.  Then, we'd need a way to know if they had checked any of these "virtual" filters so that we could modify our saved view definition and pullback the new dataset that was inclusive of those values.  

    Hope you are following.  I'm just describing the underlying problem and one possible solution.  I'd be glad to discuss more in detail if needed. To end on a positive note, the user of the Telerik controls has had a huge impact on our product's usability and excitement in our company.  So thanks,

    Eric
  12. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 07 Jun 2012 Link to this post

    Hello Eric,

    Thank you for your feedback. We appreciate it and you have a point. I will discuss all possible scenarios with our developers and we will think how to improve our API to enable these features.
     
    Kind regards,
    Jack
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  13. M. R.
    M. R. avatar
    49 posts
    Member since:
    Dec 2009

    Posted 24 Jul 2012 Link to this post

    Hello,

    I am trying to implement a similar code for the ASP.Net grid, but here is no CellFormating event in the ASP version...
    Any suggestion?

    Regards,
    M.R.
  14. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 25 Jul 2012 Link to this post

    Hello,

    This forum concerns RadGridView for WinForms, while your question is related to RadGridView for ASP.NET AJAX. Please address your question to the appropriate forums, so you can get adequate answer.
     
    All the best,
    Stefan
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  15. Matthias
    Matthias avatar
    7 posts
    Member since:
    Aug 2015

    Posted 05 Jun 2018 Link to this post

    Hello :)

    Now 5 years later ... are there any changes? My customer needs a signal that a specific column is filtered and needs a button like in the infragistics UI to clear all filters at once or clear one specific filter, as shown in the picture. How can I get this with the Telerik UI?

    Thanks in advance.

    Best regards, Matthias

     

  16. erwin
    erwin avatar
    400 posts
    Member since:
    Dec 2006

    Posted 05 Jun 2018 in reply to Matthias Link to this post

    Hi Matthias,

    current Versions of the grid indicate filtered columns by changing the color of the filter icon. A clear-all button that serves at the same time as an indicator for a filter in any columns, you will have to implement yourself.

    In my app I have wrapped the grid in a user control that consistently shows the number of records, number of filtered records and a clear all filter button that is enabled only if there are any filters active. 

    The grid exposes the needed events and properties to implement this logic exactly the way suitable for your users. Wrapping the grid saved me a few times while migrating the application through countless Telerik releases in the last 10 years. Required workarounds for bugs and glitches could often be implemented centrally in the wrapper.

    Regards

    Erwin

     

     

  17. Matthias
    Matthias avatar
    7 posts
    Member since:
    Aug 2015

    Posted 05 Jun 2018 in reply to erwin Link to this post

    Hi Erwin,

    many thanks for your fast reply.

    I saw some suggestions in this forum and tried a bit myself, but I am not satisfied with my solutions. Is it possible that you can show me some code fragments that I understand which route to go?

    I like the idea you described what you are using in your app :)

     

    Best regards

    Matthias

  18. Matthias
    Matthias avatar
    7 posts
    Member since:
    Aug 2015

    Posted 05 Jun 2018 in reply to erwin Link to this post

    Hi Erwin,

    many thanks for your fast reply.

    In my app there are about 40 columns and the color of the filter icon could be overlooked very easy.

    Therefore I like your idea that you are using in your app. Is it possible that you can show me some code fragments that I can see which route to take? I tried some suggestions from the forum and experiment myself, but the solution did not satisfy me.

     

    Best regards

    Matthias

  19. erwin
    erwin avatar
    400 posts
    Member since:
    Dec 2006

    Posted 06 Jun 2018 in reply to Matthias Link to this post

     

     

    Hi Matthias

    Here are some code snippets that solve basic problems where the solution was not obvious to me. The code is based on help here in the forum and from Teleik Support.

    Get Number of Visible Rows

    The grid does not expose this directly, for grouped grids we have to traverse the children.
    The number of available rows is best taken from the datasource.

    private static long getVisibleRows(GridViewChildRowCollection rows)
    {
        long i = 0;
        foreach (GridViewRowInfo row in rows)
        {
            // if the grid is grouped, we have to recursively descend into child rows
            if (row is GridViewGroupRowInfo)
            {
                i += getVisibleRows(row.ChildRows);
                continue;
            }
     
            i += 1;
        }
        return i;
    }
     
    /// <summary>
    /// returns number of currently visible rows in the grid
    /// </summary>
    /// <param name="grid"></param>
    /// <returns></returns>
    public static long GetVisibleRows(RadGridView grid)
    {
        return getVisibleRows(grid.MasterTemplate.ChildRows);
    }

     

     

    Are Any Filters defined Are there Any hidden columns in the grid (Show all Columns / Column Chooser visual hints)

     

    // any filters defined?
     
    bool anyFiltersDefined = grid.MasterTemplate.FilterDescriptors.Count > 0;
     
     
    /// <summary>
    /// true if there are hidden columns
    /// </summary>
    public bool HasHiddenColumns
    {
        get
        {
            foreach (GridViewDataColumn c in grid.MasterTemplate.Columns)
            {
                if (!c.IsVisible && c.VisibleInColumnChooser)
                {
                    return true;
                }
            }
            return false;
        }
    }

     

    Event Handers to catch changes to column visibility and filter configuration

     

    // register event handler for each column
    foreach (GridViewDataColumn column in this.containedGridView.Columns)
    {
        column.PropertyChanged -= this.gridViewColumn_PropertyChanged;
        column.PropertyChanged += this.gridViewColumn_PropertyChanged;
    }
     
     
    private void gridViewColumn_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "IsVisible")
        {
            // trigger your UI update logic here, a column visibility has changed
            this.UpdateMyButtons();
        }
    }
     
     
    grid.FilterChanged += new Telerik.WinControls.UI.GridViewCollectionChangedEventHandler(this.gridView_FilterChanged);
     
    private void gridView_FilterChanged(object sender, Telerik.WinControls.UI.GridViewCollectionChangedEventArgs e)
    {
            // trigger your UI update logic here, filter config has changed
           his.UpdateMyButtons();
    }

     

    Regards

    Erwin


  20. erwin
    erwin avatar
    400 posts
    Member since:
    Dec 2006

    Posted 06 Jun 2018 in reply to erwin Link to this post

    And this is how it looks
  21. Matthias
    Matthias avatar
    7 posts
    Member since:
    Aug 2015

    Posted 07 Jun 2018 Link to this post

    Many thanks, especially for the hidden and grouped hint :)

    This looks nice by the way.

     

    Best regards,

    Matthias

  22. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3819 posts

    Posted 07 Jun 2018 Link to this post

    Hello, guys,  

    I am glad to see that you are exchanging some experience with the RadGridView in the forum.

    @Erwin, I have also updated your Telerik points for your community effort.
    @Matthias, note that RadGridView offers the FilterDescriptors collection which store all filters applied to the columns. You can clear the collection in order to clear all filters or remove just a single FilterDescriptor for a given column. Additional information about the filtering functionality is available in the following help article: https://docs.telerik.com/devtools/winforms/gridview/filtering/setting-filters-programmatically-(simple-descriptors)

    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