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

[Solved] Refresh Graph on Grid Refresh

2 Answers 164 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Stewart
Top achievements
Rank 1
Stewart asked on 29 Apr 2009, 10:31 AM
Hi

I've got a Telerik grid that's Ajax enabled.  When a user clicks 'Refresh' the grid is updated with data that meets the constraints defined on the page.  That's all good.

On the same page I've got an MS Chart control that graphs data according to the same constraints on the page.  What I want is that when the 'Refresh' link on the grid is clicked the graph is also refreshed.  My question is how do I make this happen?  I've been playing around with the RadAjaxPanel and RadAjaxManager but without success unfortunately.

Regards,

Stewart

2 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 04 May 2009, 04:16 PM
Hey Stewart,

First I have to wonder why you're using MS Chart instead of RadChart. ;)

But in all seriousness, you should be able to accomplish that with something like...

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="Grid">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="Grid" LoadingPanelID="LoadingPanel1" /> 
                <telerik:AjaxUpdatedControl ControlID="Chart" LoadingPanelID="LoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 

That way the Grid is ajaxi-fied to itself and the chart for updates.  Were you trying a setup similar to this?  If not, would you mind posting what you've got so far so we can help you along with it?
0
Todd
Telerik team
answered on 04 May 2009, 05:27 PM
Hi Stewart,

Serrin's advice is exactly correct. You should use the RadAjaxManager to enable Ajax to update multiple areas on a page when a single event occurs. You can configure RadAjaxManager to handle all of your Ajax interactions- simply define controls that initiate events (via AjaxSetting) and then the controls that should be updated on the page after that event occurs (AjaxUpdatedControl).

If you're working with MasterPages or UserControls, you can place a single RadAjaxManager on your MasterPage and then use the RadAjaxManagerProxy to configure Ajax settings on your ContentPages and UserControls.

Hope that helps.

Regards,
Todd
Tags
Ajax
Asked by
Stewart
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
Todd
Telerik team
Share this question
or