RadGrid Calling ClientDataSource 3 times per request

3 posts, 0 answers
  1. Jason
    Jason avatar
    30 posts
    Member since:
    Aug 2009

    Posted 09 Nov 2018 Link to this post

    I'm hoping this is a silly error

    this is the markup

    <telerik:RadClientDataSource ID="ClaimsDataSource" runat="server" EnableServerPaging="true" EnableServerSorting="true" AllowPaging="true"  >
            <WebServiceDataSourceSettings BaseUrl="http://localhost:39338/" >
                <Select Url="ui/list/claims" RequestType="Get" DataType="JSON" EnableCaching="true"  />
        <Schema DataName="Data">
                <telerik:ClientDataSourceModelField FieldName="DateofLoss" DataType="Date" />
    <telerik:RadGrid ID="grdCLaims" runat="server" ClientDataSourceID="ClaimsDataSource" AllowPaging="true" PageSize="2" AllowSorting="true"  >
        <MasterTableView ClientDataKeyNames="ClaimItemID" DataKeyNames="ClaimItemID">
                <telerik:GridBoundColumn DataField="PolicyNumber" HeaderText="Policy Number" />
                <telerik:GridBoundColumn DataField="ClientName" HeaderText="Client" />
                <telerik:GridBoundColumn DataField="DateofLoss" HeaderText="Date of Loss" DataFormatString="{0:dd MMM yyyy}" />
            <Selecting AllowRowSelect="true" />           
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />


    this is the JSON that the service is returning

             "ClientName":"Ethan McWindsor",
             "ClientName":"Ethan McWindsor",

    no matter what i do, the service is getting called three times on the in initial page load

    from the network log in chrome



    (there is nothing in the code-behind)

    any ideas?

  2. Jason
    Jason avatar
    30 posts
    Member since:
    Aug 2009

    Posted 09 Nov 2018 in reply to Jason Link to this post

    fixed it by adding PageSize="2" to the RadClientDataSource.

  3. Attila Antal
    Attila Antal avatar
    591 posts

    Posted 13 Nov 2018 Link to this post

    Hi Jason,

    The described behavior is a known issue which is logged in our System and can be accessed in our Feedback Portal at Grid with RadClientDataSource sends two requests when navigating with Grid pager.

    Alternatively to the solution you have found, you may also check out the following Code Library: Retrieve filtered data from RadClientDataSource using RadGrid's event. This may also be a viable workaround for the reported issue.

    Kind regards,
    Attila Antal
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top