This is a migrated thread and some comments may be shown as answers.

[Solved] Clearing Boolean Filter

3 Answers 143 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert Moran
Top achievements
Rank 1
Robert Moran asked on 11 Feb 2010, 01:41 PM
Hi MVC team,

The filter functionality for boolean columns utilises two radio buttons for true and false. Initially neither of these are selected, but after selecting one and then clearing the filter, the radio button stays selected.

This means that even if a boolean filter is no longer applied, it is confusing to the user as it can look as if it is still active.

I am aware this is a browser limitation (unable to deselect radio buttons) but is it possible to change these to either be single-select checkboxes or to add another radio button for "None".

Kind regards,

Rob

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 11 Feb 2010, 04:16 PM
Hi Robert Moran,

Thank you for your feedback. I have logged this issue for further investigation. We will do one of the suggested solutions.

Regards,
Atanas Korchev
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.
0
Luke
Top achievements
Rank 1
answered on 31 Mar 2010, 01:48 PM
Hi,

We've now got the 2010.1.330 build of the grid, and there's a bug with clearing and re-applying boolean filters (I think it's present in the 2010.1.309 release as well):
Apply a boolean filter - works OK (grid is filtered, as expected)
Clear a boolean filter - works OK (grid is unfiltered, as expected)
Re-apply a boolean filter - "internal server error 500".

I've found the cause of this - the "true" and "false" values are removed from the filter radio buttons as part of the "Clear Filter" operation.  To fix it, I've made this change in "clearClick" function in telerik.grid.filtering.js:
            // Original code 
            //$element.parent() 
            //        .find('input, select') 
            //        .val('') 
            //        .removeAttr('checked') 
            //        .removeClass('t-state-error'); 
 
            // Fix: Don't remove the "true" and "false" values used on the radio buttons for boolean filters. 
            $element.parent() 
                    .find('input, select') 
                    .removeAttr('checked') 
                    .removeClass('t-state-error') 
                    .not(':radio') 
                    .val(''); 
 

Luke.


0
Atanas Korchev
Telerik team
answered on 31 Mar 2010, 04:31 PM
Hi Luke,

Thank you for submitting a bug report and a fix for it! I will apply it right away.

As a token of our gratitude I have updated your telerik points.

All the best,
Atanas Korchev
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.
Tags
Grid
Asked by
Robert Moran
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Luke
Top achievements
Rank 1
Share this question
or