protected BootstrapChartDataItem[] GetBootstrapChartData()
    {
        DataRow gridDataRow;

        BootstrapChartDataItem[] BootstrapChartDataItems = new BootstrapChartDataItem[ASPxGridView.VisibleRowCount];

        for (int i = 0; i < ASPxGridView.VisibleRowCount; i++)
        {
            gridDataRow = (ASPxGridView.GetRow(i) as DataRowView).Row;
            BootstrapChartDataItems[i] = new BootstrapChartDataItem(gridDataRow.Field <string>("CategoryName"), gridDataRow.Field <decimal>("CategorySales"));
        }

        return(BootstrapChartDataItems);
    }
示例#2
0
        protected BootstrapChartDataItem[] GetBootstrapChartData()
        {
            DataRow gridDataRow;

            BootstrapChartDataItem[] BootstrapChartDataItems = new BootstrapChartDataItem[ASPxGridView1.VisibleRowCount];

            for (int i = 0; i < ASPxGridView1.VisibleRowCount; i++)
            {
                gridDataRow = (ASPxGridView1.GetRow(i) as DataRowView).Row;
                BootstrapChartDataItems[i] = new BootstrapChartDataItem(gridDataRow.Field <string>("ProductName"),
                                                                        gridDataRow.Field <string>("QuantityPerUnit"), gridDataRow.Field <decimal>("UnitPrice"));
            }

            return(BootstrapChartDataItems);
        }