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

RadChart Open a Modalpopup on click

2 Answers 141 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jessy Joseph
Top achievements
Rank 1
Jessy Joseph asked on 09 Sep 2010, 09:44 PM
Hi
 
I am using a RadChart - Bar. Currently when the user clicks on the bar the new page opens. But instead of a page I want Ajax modalpopup. Is there any way to do that and how can I pass the values of the that bar to the ModalPopup. 
 
Follwing are the code I using it currently 
 
 In the ItemDataBound :
//ShowPopUpDialog 
    
ChartSeriesItem item = e.SeriesItem; 
    
item.ActiveRegion.Tooltip = (string)((DataRowView)e.DataItem)["TeamName"]; 
    
item.ActiveRegion.Url = "javascript:ShowPopUpDialog('Check.aspx?campaign=" 
    
+ item.ActiveRegion.Tooltip + "'); ";

In the javascript
<script type="text/javascript"
    
function ShowPopUpDialog(url) { 
    
 window.open(url, 'MyPopUpWindow', 'height = 600px, width = 800px', true); 
    
}

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Yavor
Telerik team
answered on 14 Sep 2010, 07:32 AM
Hi Jessy,

When clicking on the chart, you can open a modal popup radwindow, to show the relevant additional data.
This is demonstrated in the following example:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

it uses a grid, but the same approach is applicable to the chart.
This can be used, coupled with this approach:

http://www.telerik.com/help/aspnet-ajax/advancedopenpopup.html

I hope this information gets you started properly.

Kind regards,
Yavor
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jessy Joseph
Top achievements
Rank 1
answered on 14 Sep 2010, 08:21 PM
Thanks Yavor for the solution, it worked like magic.
Tags
Chart (Obsolete)
Asked by
Jessy Joseph
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Jessy Joseph
Top achievements
Rank 1
Share this question
or