public TopNDemo() { InitializeComponent(); Tag = Properties.Resources.TopNDemoDesc; this.Loaded += (s, ea) => { if (!pivotGrid.IsVisible) { return; } if (isLoaded) { return; } isLoaded = true; // bind to data source var panel = new FlexPivotPanel(); panel.DataSource = Utils.PivotDataSet.Tables[0].DefaultView; pivotGrid.ItemsSource = panel; fpEngine = panel.FlexPivotEngine; // apply update to view fpEngine.BeginUpdate(); fpEngine.RowFields.Add("Country"); fpEngine.ColumnFields.Add("Salesperson"); fpEngine.ValueFields.Add("ExtendedPrice"); fpEngine.Fields["ExtendedPrice"].Format = "c0"; fpEngine.EndUpdate(); }; }
public static C1FlexPivotEngine GetPivotEngine() { C1FlexPivotEngine fp = new C1FlexPivotEngine(); fp.ConnectCube(cubeName, connectionString); fp.BeginUpdate(); fp.ColumnFields.Add("Color"); fp.RowFields.Add("Category"); fp.ValueFields.Add("Order Count"); fp.EndUpdate(); return(fp); }
public static C1FlexPivotEngine GetPivotEngine(Workspace workspace) { C1FlexPivotEngine fp = new C1FlexPivotEngine(); fp.Workspace = workspace; fp.ConnectDataEngine("SalesByEmployeeCountry"); fp.BeginUpdate(); fp.ColumnFields.Add("Country"); fp.RowFields.Add("Salesperson"); fp.ValueFields.Add("Sales"); fp.EndUpdate(); return(fp); }
public static C1FlexPivotEngine GetPivotEngine(Action <C1FlexPivotEngine> action) { C1FlexPivotEngine fp = new C1FlexPivotEngine(); fp.ConnectCube(cubeName, connectionString); fp.UpdateCompleted += (s, e) => { action.Invoke(fp); }; fp.BeginUpdate(); fp.ColumnFields.Add("Color"); fp.RowFields.Add("Category"); fp.ValueFields.Add("Order Count"); fp.EndUpdate(); return(fp); }
public static C1FlexPivotEngine GetPivotEngine(Workspace workspace, Action <C1FlexPivotEngine> action) { C1FlexPivotEngine fp = new C1FlexPivotEngine(); fp.Workspace = workspace; fp.ConnectDataEngine("SalesByEmployeeCountry"); fp.UpdateCompleted += (s, e) => { action.Invoke(fp); }; fp.BeginUpdate(); fp.ColumnFields.Add("Country"); fp.RowFields.Add("Salesperson"); fp.ValueFields.Add("Sales"); fp.EndUpdate(); return(fp); }