private void LoadDefaultLayOutFromXml() { string dirPath = string.Format("{0}\\DefaultLayOut", _application.ApplicationPath); string fileName = string.Format("{0}.xml", _pageID); PivotGridLayoutHelper.LoadXml(this.pivotGridControl1, dirPath, fileName); }
private void btnQuery_Click(object sender, EventArgs e) { var grid = this.pivotGridControl1; var layoutDs = PivotGridLayoutHelper.GetLayOutFromPivotGrid(grid); var activerFilter = this.pivotGridControl1.ActiveFilterString; Query(layoutDs, activerFilter); }
private void btnSaveLayOut_Click(object sender, EventArgs e) { string message = "Do you want to save PivotGridLayOut?"; DialogResult result = MessageBox.Show(message, "Save Default LayOut", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { string dirPath = string.Format("{0}\\DefaultLayOut", _application.ApplicationPath); string fileName = string.Format("{0}.xml", _pageID); PivotGridLayoutHelper.SaveXml(this.pivotGridControl1, dirPath, fileName); } }
private void SetDefaultLayOut(DataSet layoutDs = null, string activerFilter = null) { var grid = this.pivotGridControl1; if (layoutDs != null) { PivotGridLayoutHelper.ApplyLayOutFromPivotGrid(grid, layoutDs); } else { string dirPath = string.Format("{0}\\DefaultLayOut", _application.ApplicationPath); string fileName = string.Format("{0}.xml", _pageID); PivotGridLayoutHelper.LoadXml(grid, dirPath, fileName); } grid.ActiveFilterString = activerFilter; ShowTotal(this.pivotGridControl1); }