I am working on an AJAX page with two radgrid controls.
The update response times for the two controls are very different, one short , one very long.
No matter how I hook up grids the ajax update of both controls is determined by the longest delay.
ie button 1 fires panel 1 holding grid 1
button 2 fires panel 2 holding grid 2
No matter which panel is fired, both data requests are made and the page waits for the longest to complete before updating anything. Oddly, only the appropriate grid actually updates, but the data for the other grid must be cached, since clicking the other button updates the page without another data request.
I need these controls to be truly independent, or else why bother with Ajax at all.
Does anyone have an example of page where the controls are truly independent?
2 Answers, 1 is accepted
I am sorry you are having difficulty implementing AJAX functionality with your RadGrid. I am going to assume (without having seen your code) that you are either firing both AJAX requests at the same time or are firing one and then firing the other before the first completes. What you need to understand about Microsoft's ASP.NET AJAX framework (which is what the RadControls are built on top of) is that once an AJAX request is made, any subsequent request that is made before it completes will cancel it. So if you click the button which updates RadGrid #1 and then click the button which updates RadGrid #2 before RadGrid #1 is updated, the first request will be cancelled.
Also, let me explain briefly how the RadAjax controls work. The RadAjaxPanel updates any content inside of it when an AJAX request is made to the server either by a postback initiated from a control inside of it or from another control which calls the ajaxRequest() or ajaxRequestWithTarget() functions. So if you have multiple controls inside of a RadAjaxPanel and an AJAX request is sent, all controls inside of the RadAjaxPanel will update when the request completes. You can learn more about the RadAjaxPanel here.
On the other hand, the RadAjaxManager allows you to specify controls which you want to update and which controls initiates the AJAX request. This allows for a much higher level of control. So you can hook a Button control up with one or more RadGrid controls (or any other control) and clicking on that Button will cause the controls it is associated with to update when the AJAX request completes. You can learn more about the RadAjaxManager here.
I have created simple examples below which demonstrate how to use both RadAjax controls to update two RadGrids.
I hope this has helped you. I you have further questions, please let me know.
So I guess it's back to frames so I can separate the execution paths. Given the LIFO nature of the asp.ajax framework it's a wonder anyone bothers.
In any case, thanks for the info.