Ajax update specific rows in a repeater

4 posts, 0 answers
  1. John
    John avatar
    28 posts
    Member since:
    Mar 2010

    Posted 30 Oct 2014 Link to this post

    Hi all,

    I currently have a list of objects in session memory.  I am wondering if there is an efficient way of rendering the changes of a specific object to a repeater without having to call DataBind() on the whole list.

    John
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 04 Nov 2014 Link to this post

    Hi John,

    Since the Repeater is a data bound control, the only way to refresh its data is by changing the data source and calling the DataBind method.

    However, you could also try to find the controls that will display the data for each item and manually change their values, but this is a neat workaround and you will only change the displayed data and not the underlying data source of the Repeater, so I am not sure that this is an appropriate solution.


    Regards,
    Konstantin Dikov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. John
    John avatar
    28 posts
    Member since:
    Mar 2010

    Posted 04 Nov 2014 in reply to Konstantin Dikov Link to this post

    Thanks for the reply.  The reason for my question is a performance issue.  I am finding that when the list is small, it's all fine.  However, when the list grows (list is nested with objects, totals to ~300 objects), the performance degrades.  Even a simple click of a button that doesn't affect the list, but is in the same RadAjaxPanel is taking a long response time.

    Any suggestions on improving performance when it comes to lists of objects inside a RadAjaxPanel?
  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 06 Nov 2014 Link to this post

    Hi John,

    I completely understand your idea, but this is a limitation of the data-bound controls and there is nothing that could be done, except the manual update which I have suggested in my previous post (which once again is not a recommended one).

    As for your question regarding the RadAjaxPanel. When a postback is initiated from a control placed within a RadAjaxPanel, the entire content and all child controls will be updated. If you have more complex requirement and you want to update particular controls when some control initiates a postback, you could use RadAjaxManager, which could be used for such relationships (Initiator control -> Controls to update).

    Detailed information and online demo for RadAjaxManager could be found in the following links:
    Hope this helps.
     

    Regards,
    Konstantin Dikov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top