This is a migrated thread and some comments may be shown as answers.

ListView and NeedDataSource with RadAjaxManager

3 Answers 182 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Chris Kalle
Top achievements
Rank 1
Chris Kalle asked on 05 Feb 2010, 03:55 AM
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

3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 05 Feb 2010, 09:44 AM
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.
0
Chris Kalle
Top achievements
Rank 1
answered on 07 Feb 2010, 11:04 PM
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
0
Sebastian
Telerik team
answered on 08 Feb 2010, 01:43 PM
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.
Tags
ListView
Asked by
Chris Kalle
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Chris Kalle
Top achievements
Rank 1
Share this question
or