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

Filter not resetting if filtervalue is empty in client side filtering

4 Answers 171 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Valli
Top achievements
Rank 1
Valli asked on 10 Oct 2014, 01:21 PM
I am doing the data binding and filtering using the client side scripting.

I have set the following attributes for the GridDateTimeColumn:

GridDateTimeColumn.CurrentFilterFunction = GridKnownFunction.Between
GridDateTimeColumn.EnableRangeFiltering = True
GridDateTimeColumn.EnableTimeIndependentFiltering = True

The filter command is firing when i entered date in the From and To textboxes. That is fine.
The problem is, once i cleared both the textboxes, the filter command is not firing.
Also, when the filter command is firing for other columns, it still keeps the value entered in the From and To textboxes of the GridDateTimeColumn.

So, please help me how to invoke filter command as the command name as "NoFilter" if the filter value is cleared by the user.

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 15 Oct 2014, 08:05 AM
Hello Valli,

I could only assume that you are hiding the filter icon for your GridDateTimeColumn and you are setting the AutoPostBackOnFilter property to true. If that is the case, the behavior that you are observing when the values in the RadDatePickers are cleared is due to the fact that since there are no selected values within the controls and the current filter function is set to Between, no filtering will be performed. Although this is a limitation with such settings, I will contact our developers team, so they could consider clearing the filter when the dates are removed in both pickers.

As for the kept filter values from the other columns, this is the default filter behavior and if you want to have filtering only on one column at a time you should clear the other columns filter values manually.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Valli
Top achievements
Rank 1
answered on 15 Oct 2014, 01:20 PM
Hi Konstantin Dikov,

Thanks for the reply.

I have done some workaround for this issue and is working fine now :)

But still my question is, consider i have set the following properties for the GridBoundColumn, ShowFilterIcon = False and AutoPostBackOnFilter = True. If there is value in the filter text box, it invokes the "Contains" command. If we clear the value, still it invokes the "Contains" command with the filter value as empty string. Is it possible to invoke the "NoFilter" command if the filter value is empty?

If not, it must be a bug, because the "NoFilter" command will never get invoked when the following properties are set:
ShowFilterIcon = False and AutoPostBackOnFilter = True

I hope you got my point :)
0
Konstantin Dikov
Telerik team
answered on 20 Oct 2014, 07:07 AM
Hi Valli,

As I have mentioned in my previous post, this must be considered as a limitation with the current implementation of the control, because you are actually setting the only filter function that will be used for that column and even with no value, the same filter function will be used (specified in the CurrentFilterFunction).

However, I completely understand that this is not user friendly and one should expect that "NoFilter" will be invoked when there is no value, and as I have said, I am forwarding this to our developers team for further consideration.

In the meantime, you could create a feature request in our Ideas & Feedback Portal, which will further increase the priority of this issue.


Kind Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Valli
Top achievements
Rank 1
answered on 21 Oct 2014, 12:08 PM
Hi Konstantin Dikov,

Thanks for your support.

I have raised a request in the Ideas & Feedback Portal. Please find below the link:

http://feedback.telerik.com/Project/108/Feedback/Details/140862-nofilter-is-not-invoked-when-there-is-no-filter-value-with-autopostbackonfilter-i
Tags
General Discussions
Asked by
Valli
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Valli
Top achievements
Rank 1
Share this question
or