コード例 #1
0
        public TopN()
        {
            InitializeComponent();
            // get data
            var dt = DemoDataSource("select * from Invoices", true);

            // bind to data source
            var panel = new C1FlexPivotPanel();

            panel.DataSource            = dt;
            c1FlexPivotGrid1.DataSource = panel;

            // initialize view
            _engine = panel.FlexPivotEngine;
            _engine.RowFields.Add("ProductName");
            _engine.ColumnFields.Add("Country");
            _engine.ValueFields.Add("Quantity");
        }
コード例 #2
0
        public Form1()
        {
            InitializeComponent();
            // get data
            var da = new OleDbDataAdapter("select * from [Sales By Category]", GetConnectionString());
            var dt = new DataTable();

            da.Fill(dt);

            // bind to data source
            var panel = new C1FlexPivotPanel();

            panel.DataSource            = dt;
            c1FlexPivotGrid1.DataSource = panel;

            // initialize view
            _engine = panel.FlexPivotEngine;
            _engine.RowFields.Add("ProductName");
            _engine.ColumnFields.Add("CategoryName");
            _engine.ValueFields.Add("ProductSales");
        }