How to create a chart from a GridControl

353 Views Asked by At

Prior asking this question, i read similar post such as:

But i am still unable to show my datagridview data to a my chart. I am using xtragrid and Xtracharts controls to achieve my task and in my datagridview, i have some unbound columns.

here is the code i have tried to use

private  void ChartData()
        {
            Series S = new Series();
            LineSeriesView view = new LineSeriesView();
            S.View = view;
            ProdchartControl.DataSource = ProdgridControl.DataSource;
            S.ArgumentDataMember = "Prod Date";
            S.ValueDataMembersSerializable = "Orange prod";
            ProdchartControl.SeriesDataMember = "ProdID";
            ProdchartControl.Series.Add(S);

        }

your assitance will be welcomed.

Thanks.

1

There are 1 best solutions below

0
AlexK On

ChartControl provides built-in integration with the GridControl component (see Integration with a Data Grid, Vertical Grid, Tree List or List Box via ControlRowSource).

For an example with unbound fields, refer to the How to display data from an unbound column displayed in the grid control ticket.