We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Load a chart from row selected in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

129439 Mar 17,2017 12:53 PM Mar 20,2017 07:55 AM ASP.NET Web Forms 1
loading
Tags: Chart
Roimer Machacón Otero
Asked On March 17, 2017 12:53 PM

Hi we're using syncfusion charts and grid.

In the first load of the page the chart is loaded from code behind, now the user interact with data of a grid that when a row of the grid was selected, we must load the chart from the information in the row.

Exist a form for combine this two loads of the charts in the page?

Dharanidharan Dharmasivam [Syncfusion]
Replied On March 20, 2017 07:55 AM

Hi Roimer, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and prepared a sample with respect to your requirement. In this, we have bind data for chart in code behind initially. Then when clicked on the grid, with RowSelected event, we can able to extract the selected data and bind that dataSource to chart. Find the code snippet below. 

ASP.NET: 

<ej:Grid runat="server"> 
   <ClientSideEvents RowSelected="rowselect" /> 
</ej:Grid> 

function rowselect(args) { 
            var chart = $("#MainContent_Chart1").ejChart("instance"); 
            chart.model.series[0].dataSource[0] = args.data; 
            chart.redraw(); 
        } 

Screenshot with selected data: 
 
Sample for reference can be find from below link: 
 
Thanks, 
Dharani. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;