I am using Syncfusion tools to generate a graph dynamically from the data grid. The grid consists of multiple rows and each row has a checkbox for selection. The purpose of the checkbox is to select the entire row data and include that on the graph and grid in the word report. Upon the checkbox selection of a particular row in a grid, the data in that grid needs to be on the graph. Currently, all the data points in the grid are displayed and I am trying to change the logic by adding a condition to pull the data on the graph conditionally. Can someone please help me figure out the logic to get the data on the graph on checkbox selection only. I have researched a lot with no luck yet.
The X-axis: Emphasis area Y-axis: Incidents Here’s the code:
private void HandleRecordTypeQ3(int r)
{
PerformanceMeasureDataItem dataItem = reportData.PerformanceMeasureDataList[rCount + q3Count];
q3Count++;
var emphArea = data.Rows[r][RespnseColumnIndex].ToString();
var abbr = data.Rows[r][AbbrColumnIndex].ToString();
var targetCrash = data.Rows[r][TargetCrashtypeColumnIndex].ToString();
var isExluded = data.Rows[r][IsExcludedColumnIndex].ToString();
isExluded = String.IsNullOrEmpty(isExluded) ? "N" : isExluded;
var isGraph = data.Rows[r][IsGraphColumnIndex].ToString();
isGraph = String.IsNullOrEmpty(isGraph) ? "N" : isGraph;
dataItem.Criteria = emphArea;
dataItem.Abbr = abbr;
dataItem.TargetCrashType = targetCrash;
dataItem.IsIncludedinReport=isInluded.Equals("False", StringComparison.OrdinalIgnoreCase) ? false : true;
dataItem.IsGraphData = isGraph.Equals("N", StringComparison.OrdinalIgnoreCase) ? false : true;
for (int i = 0; i < dataItem.Incidents.Count; i++)
{
var rateOfseriousInjuries = data.Rows[r][NumOfFatalitesColumnIndex + i] != null ? data.Rows[r][NumOfFatalitesColumnIndex + i].ToString() : "0";
IncidentInformation currentIncident = dataItem.Incidents[i];
currentIncident.RateOfSeriousInjury = ConvertToDouble(rateOfseriousInjuries);
}
Thanks,
Dimpy