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

filter column in grid between two radsearchbox.

1 Answer 84 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Grzegorz
Top achievements
Rank 1
Grzegorz asked on 20 Oct 2016, 04:03 PM

Hello,

I want filtr in  grid between two radsearchbox. I would also that after filtering vaule remained RadSearchBox. My code not working:

 <telerik:GridBoundColumn HeaderText="Name" UniqueName="_amountColumn" DataField="Amount">
                         <FilterTemplate>
                        <telerik:RadSearchBox runat="server" ID="From" Text="Form" OnClientSearch="FromSelected"></telerik:RadSearchBox>
                        <telerik:RadSearchBox runat="server" ID="To" Text="To" OnClientSearch="ToSelected"></telerik:RadSearchBox>

                            <telerik:RadScriptBlock ID="RadScriptBlock" runat="server">
                                <script type="text/javascript">
                                    function FromSelected(sender, args) {
                                        var startValue = FromOrderBrutto.get_value();
                                        var endValue = ToOrderNetto.get_value();

                                        tableView.filter("_amountColumn", startValue + " " + endValue, "Between");

                                    }
                                    function ToSelected(sender, args) {
                                        var startValue = FromOrderBrutto.get_value();
                                        var endValue = ToOrderNetto.get_value();


                                        tableView.filter("_amountColumn", startValue + " " + endValue, "Between");
                                    }
                                 
                                </script>
                            </telerik:RadScriptBlock>
                        </FilterTemplate>

Please help my

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 25 Oct 2016, 12:25 PM
Hello Grzegorz,

From what I see in the client-side logic that you are executing, the between filter should work correctly with that implementation, but you need to ensure that you are passing two values to the filter method.

As for the current filter values in the RadSearchBox, you could follow the suggestions from the following forum thread:
Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Filter
Asked by
Grzegorz
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or