Filter not resetting if filtervalue is empty in client side filtering

5 posts, 0 answers
  1. Valli
    Valli avatar
    3 posts
    Member since:
    Sep 2014

    Posted 10 Oct 2014 Link to this post

    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.
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 15 Oct 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Valli
    Valli avatar
    3 posts
    Member since:
    Sep 2014

    Posted 15 Oct 2014 in reply to Konstantin Dikov Link to this post

    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 :)
  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 20 Oct 2014 Link to this post

    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.

     
  6. Valli
    Valli avatar
    3 posts
    Member since:
    Sep 2014

    Posted 21 Oct 2014 in reply to Konstantin Dikov Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017