filter column in grid between two radsearchbox.

2 posts, 0 answers
  1. Grzegorz
    Grzegorz avatar
    1 posts
    Member since:
    Oct 2016

    Posted 20 Oct Link to this post

    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

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 25 Oct Link to this post

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