Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1825
Bar charts within the grid?
posted

Good morning,

 Have been given a task to automate and excel rpt sent to upper mgt.

It contains serveral bar charts within the excel sheets themselves.

Is this possible to do in the win grid and then have the grid export the data and charts on a worksheet?

Example:

Example Doc Rpt

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    There's no built-in way to embed a chart control within a grid.

    But there might be a way to acheive something you could use.

    I'm not all that familiar with the chart control, but I am pretty sure that it has a method to allow you to create an image (a bitmap) from the chart. So what you could do is add an unbound image column to the grid. In the InitializeLayout event of the grid, you could create a Chart control and get an image from it, then put that image into the grid.The only down side to this is that you might have trouble with performance. Creating the chart and creating an image might slow things down a bit depending on the size and complexity of the chart. So you might be able to implement some sort of caching mechanism where you store the image and only re-create it when something in the row has changed since the last time the image was generated. 

Children
No Data