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. Image for the cookie policy date

Inserting Chart into GridControl

Hi , I am using GridControl and its implemented to work as Excel.But Now I need the functionality of "inserting chart" as in Excel. So How can I insert a chartControl into a GridControl. Please help. Regards, Jitendra.

3 Replies

AD Administrator Syncfusion Team May 3, 2005 12:04 PM UTC

If you want to put a ChartControl in a cell, you can use Control CellType. myChartControl.Hide(); grid[2,2].CellType = "Control"; grid[2,2].Control = myChartControl; grid.Controls.Add(myChartControl); You could use a coveredrange if you want it to occupy several cells. If you want the chart to float over the grid, this will be more work as you have to decide want happens when the grid scrolls. Here is a forum thread that has one potential solution for this scrolling requirement. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=27889


JI Jitendra May 3, 2005 01:35 PM UTC

Hi , Thanks for the help.I am able to place charts in the gird as Controls.But the Problem is with saving.I am saving the data in the grid with SaveBinary method and loading data into grid with LoadBinary method.So how to save the chart dat along with grid data and how to restore the chart while opening. Thanks, Jitendra


AD Administrator Syncfusion Team May 3, 2005 01:59 PM UTC

Currently, there is no serialization support in Chart. This is an active feature request, and this support is being worked on, but is not available yet. I do not know when it will be available. So for now, if you want to serialize the chart, you would have to do something yourself. Where is your chart getting its data? Can you serialize its datasource some how? If so, then before calling LoadBinary to load the grid, you can read in your chart data and use it to set up a chart object for use when you load the grid. You could do something similar when you call SaveBinary.

Loader.
Live Chat Icon For mobile
Up arrow icon