RadMultiselect filtering call webservice function twice

0 Answers 22 Views
MultiSelect
chandi
Top achievements
Rank 1
chandi asked on 02 Feb 2022, 04:01 AM

Hi,

I am binding data to RadMultiSelect control through web service method.

when I am trying to filter data (typing on RadMultiselect control) it calls web service method twice.

Issue is, either it holds the filter value in first time hit, second time hit filter value get cleared. 

How can I prevent web service multiple times hit.

I have inserted the code for your reference.

<div>
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
            <telerik:RadAjaxPanel ID="ap" runat="server">
                <telerik:RadMultiSelect runat="server" Filter="Contains" EnforceMinLength="false" AutoClose="false" DataTextField="description" DataValueField="department" 
                Width="400px" ID="RadMultiSelect1" Placeholder="Shipping names..." DropDownHeight="130" ClientDataSourceID="RadClientDataSource1" AutoPostBack="false">
                <VirtualSettings ItemHeight="26" ValueMapper="valueMapper"  />
                <ItemTemplate>
                    <span class='order-id'>#= department #</span> #= description #
                </ItemTemplate>            
            </telerik:RadMultiSelect>
                <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server"
                                EnableServerFiltering="true"
                                AllowPaging="true"
                                EnableServerPaging="true" PageSize="20">
                        <ClientEvents OnCustomParameter="OnCustomParameter" />
                        <DataSource>                                    
                            <WebServiceDataSourceSettings ServiceType="Default">                                        
                                <Select Url="WebService1.asmx/GetOrders" DataType="JSON" RequestType="Post" ContentType="application/json;charset=utf-8" />
                                    </WebServiceDataSourceSettings>
                                </DataSource>
                                <Schema DataName="d.Data" TotalName="d.Count" ResponseType="JSON">
                                    <Model>
                                        <telerik:ClientDataSourceModelField DataType="String" FieldName="department" />
                                        <telerik:ClientDataSourceModelField DataType="String" FieldName="description" />                                            
                                    </Model>
                                </Schema>
                            </telerik:RadClientDataSource>
                </telerik:RadAjaxPanel>
        </div>

 

Thanks & Regards,

Chandi

No answers yet. Maybe you can help?

Tags
MultiSelect
Asked by
chandi
Top achievements
Rank 1
Share this question
or