Completed
Last Updated: 05 Nov 2018 08:54 by Smit
ADMIN
Attila Antal
Created on: 13 Aug 2018 10:45
Category: UI for ASP.NET AJAX
Type: Bug Report
3
TextBox values are not cleared when NoFilter is applied in RadGrid Excel-Like filtering
After having a filter applied, filter value is not cleared when FilterOption was set to "NoFilter".


The following client-side logic would clear the textbox values before the filtering is applied if filter options are set to "NoFilter"

            function onCommand(sender, args) {
                if (args.get_commandName() == "HeaderContextMenuFilter") {
                    var firstTextBox = $("[id$='HCFMRTBFirstCond']")[0].control;
                    var firstFilterOption = args.get_commandArgument().split("|")[1];

                    var secondTextBox = $("[id$='HCFMRTBSecondCond']")[0].control;
                    var secondFilterOption = args.get_commandArgument().split("|")[3];

                    if (firstFilterOption.includes("NoFilter") && firstTextBox.get_value() != "") {
                        args.set_cancel(true);
                        var value = firstTextBox.get_value();
                        firstTextBox.clear();
                        var newArg = args.get_commandArgument().replace("|" + value + "|?", "||?");
                        args.get_tableView().fireCommand(args.get_commandName(), newArg);
                    }

                    if (secondFilterOption.includes("NoFilter") && secondTextBox.get_value() != "") {
                        args.set_cancel(true);
                        var value = firstTextBox.get_value();
                        secondTextBox.clear();
                        var newArg = args.get_commandArgument().replace("|" + value + "|?", "||?");
                        args.get_tableView().fireCommand(args.get_commandName(), newArg);
                    }
                }
            }
1 comment
Smit
Posted on: 12 Sep 2018 13:48
Is the issue had been fixed in today's update(Q3 2018)?