Multiple Postback onRadClientDataSource when WebServiceDataSourceSettings has no items

4 posts, 0 answers
  1. Kuya
    Kuya avatar
    8 posts
    Member since:
    Sep 2016

    Posted 29 Aug 2018 Link to this post

    Hi! We have had this problem for quite some time now.We have this code:

     <telerik:RadClientDataSource ID="csDsInprog" runat="server" EnableServerPaging="false" EnableServerSorting="false" AllowPaging="false" ClientEvents-OnCustomParameter="ParameterMap" EnableViewState="false"
                  ClientEvents-OnRequestEnd="showInProgressGrid">
                  <DataSource>
                    <WebServiceDataSourceSettings>
                      <Select Url="/user/history/Default.aspx/GetHistoryInProg" RequestType="POST" DataType="JSON" ContentType="application/json" />
                    </WebServiceDataSourceSettings>
                  </DataSource>
                  <Schema DataName="d">
                  </Schema>
                </telerik:RadClientDataSource>

     

    This is the ClientDataSourceID for a radgrid. However, when there are no records returned by the URL, we see that it does multiple postbacks. If it does return information, it does the postback only once.

     

    Can you help us with this one? We have updated to the latest version of the UI but still it has the same error.

  2. Kuya
    Kuya avatar
    8 posts
    Member since:
    Sep 2016

    Posted 30 Aug 2018 in reply to Kuya Link to this post

    Further debugging-

    we have a clientside ".rebind()". When a button is clicked, it does the rebind of the radgrid with the above datasource.

    It seems the problem is with the rebind() part. 

  3. Kuya
    Kuya avatar
    8 posts
    Member since:
    Sep 2016

    Posted 30 Aug 2018 in reply to Kuya Link to this post

    Confirmed. It is happening when mastertable.rebind() is executed on client side, and datasource is from a RadClientDataSource.

    Steps to reproduce:

    1. Create a page with basic radgrid and RadClientDataSource (post, json) 
    2. On the webmethod for the RadClientDataSource, return empty list of data
    3. On browser, trigger the client-side rebind and check the "network" tab
    4. You will see multiple calls to the URL 

    <With Data> 
    5. Modify your webmethod to return at least 1 data
    6. Go back to browser, and trigger rebind. Then check the "network" tab again.
    7. URL will be called only once

  4. Eyup
    Admin
    Eyup avatar
    3784 posts

    Posted 03 Sep 2018 Link to this post

    Hello Kuya,

    There was a similar bug:
    https://feedback.telerik.com/Project/108/Feedback/Details/214763-grid-with-radclientdatasource-sends-two-requests-when-navigating-with-grid-pager

    You can try to enable ServerPaging, Sorting and Filtering to check whether this will resolve the issue.

    Regards,
    Eyup
    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