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.
Syncfusion Feedback

Connection between a chart data and a grid .

Thread ID:





44009 May 10,2006 05:52 PM UTC May 16,2006 11:28 AM UTC Windows Forms 2
Tags: Chart
Amit Weisman
Asked On May 10, 2006 05:52 PM UTC

Hi. I have data which is not from data base, just internal in-memory structure. Currently I present this data in a chart (after moving it into series of points). I would like to add a table of the chart which will include a row (or a column) for each series of points. So I’ll have a visual representation of the data in the chart and a textual one in the table. Is there a built-in option like the one I just described? Is the virtual grid is the grid option that best suites my needs(any grid like control will do, I don’t need the full strength of the grid, just basic , column sorting , choosing a range etc.)? Is there an easy way to connect the chart data to the virtual grid? I hope my point is clear. I’d appreciate any input on the subject. Because I’m trying to incorporate two packages I post the same message on both the Grid forum and the Chart forum. Thanks Amit

Amit Weisman
Replied On May 15, 2006 01:38 PM UTC

Hi Haneef . Thanks for your reply. I guess by now you already understand what I want to do (according to your first example). I have data that I would like to put into a chart and a grid at the same time and have some sorting capabilities on the grid. Option 1 : Use the virtual grid and implement a layer that will connect the query in the grid with the data in the chart series. This is nice and quick but then I’ll have to do heavy lifting to get the sorting feature (sort each time according to another X point in the chart). Options 2 : Use a simple grid. I still don’t know how to get the sorting to work (I hope sorting along a column is simple) , but I have to manually put each point in the table because I can’t “load” a series of points to the grid at once. This looks like a waste of time (let’s say I can live with the memory for hold two copies of the data). I’m looking for something like this (see attached project) : double [] x = new double[] {10 , 20 , 30 , 40 , 50} ; double [] y = new double[] {23 , 43 , 78 , 49 , 21} ; // insert the data to the chart ChartSeries cs = this.chartControl1.Model.NewSeries() ; for(int i = 0 ; i < y.Length ; i++) cs.Points.Add(x[i] , y[i]) ; this.chartControl1.Series.Add(cs) ; // insert the data to the table this.gridControl1.Model.PopulateValues( GridRangeInfo.Cells(1 , 1 , 1 , 5) , cs.SeriesModel) ; What can I “put” instead of cs.SeriesModel at the last line to make this work ? Any other options ? Ideas ? Is there a way to get an array from the series that can be loaded into the grid ? (I post this in both the chart and grid forums) Thanks Amit


Administrator [Syncfusion]
Replied On May 16, 2006 11:28 AM UTC

Hi Amit, I''ve responded to your original post. Regards, Haneef


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.

Warning Icon 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.Close Icon