ListView and NeedDataSource with RadAjaxManager

4 posts, 0 answers
  1. Chris Kalle
    Chris Kalle avatar
    2 posts
    Member since:
    Feb 2010

    Posted 04 Feb 2010 Link to this post

    Hi All

    I have a site I am working on at work and I am using MasterPages, ContentPages and Telerik user controls.

    One page I am working on is using a TreeView inside a splitter (pane 1) and a listview inside Pane 2. On the MasterPage I have
    a RadAjaxManager with all the settings for specific content pages... In the process of moving to content pages code behind using a Master page property accessor for AjaxManager.

    My problem is that the treeView node click updates an object datasource (ArrayList) and then the NeedDataSource event handler on the list view needs to fire to get it. Except I'm having issues with getting this all working using the Ajax Manager settings. The smart tag designer did nothing either.

    I tried setting the rebind event at the Item click event on TreeView this works however after one NeedDataSource event handler has fired any other Rebinds fail with server code 500.

    I had it working with the AjaxManager settings in the markup but needed to change a setting now it doesnt work.
    Can anyone provide valid AjaxManager settings to set this all up.

    Thanks in advance

    Chris
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 05 Feb 2010 Link to this post

    Hello Chris,

    In master/content page scenario the recommended approach to ajaxify controls declaratively is by using RadAjaxManager in combination with RadAjaxManager proxy. I believe that the support resources pointed below will help you configure the ajax settings in your scenario:

    http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/usercontrol/defaultcs.aspx
    http://www.telerik.com/help/aspnet-ajax/ajax-manager-proxy.html

    To fire the NeedDataSource event of RadListView explicitly at some stage of the lifecycle (i.e. when the ArrayList is modified), simply invoke the Rebind() method of the listview. See this article from the online help for details.

    Best regards,
    Sebastian
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chris Kalle
    Chris Kalle avatar
    2 posts
    Member since:
    Feb 2010

    Posted 07 Feb 2010 Link to this post

    Hi Sebastian / Telerik

    I am calling the Rebind method on the RadListView control which fires the NeedDataSource event.

    However as stated in my initial post this works on the first attempt however any consecutive calls fail with a PageRequestManager
    Server error 500.  "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"... This happens when a different node (different ListView data is populated in the ArrayList).
    To Add: On clicking the same RadTreeNode (get the same list view data as the call before) it throws an MicrosoftAJAX error
    Error: c00ce514.

    I am using a custom Item Template as Server tags didnt work for me, issue with moving controls containing server tags between controls. Tried using the RadCodeBlock but with no success...

    A working demo would be great using custom ItemTemplates and a RadTreeView ajax initiator for a RadListView ;)

    Thanks

    Chris
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 08 Feb 2010 Link to this post

    Hello Chris,

    Unfortunately I am still not able to reproduce the issue in my local tests. I suggest you utilize the general troubleshooting tips from this page (the bottom section concerning server error 500 in particular).

    If the problem remains, please provide a live url where the problem can be seen or isolate a working subset of your project and send it attached to a regular support ticket. Thus we will do our best to provide up-to-point answer/solution.

    Kind regards,
    Sebastian
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top