private void DrawGrid(XtraPivotGridHelper.DataViewTable dt) { pivotGridControl1.BeginUpdate(); XtraPivotGridHelper.ClearPivotGridFields(pivotGridControl1); XtraPivotGridHelper.CreatePivotGridFields(pivotGridControl1, dt); pivotGridControl1.DataSource = dt.DataTable; formatCells(pivotGridControl1); pivotGridControl1.EndUpdate(); pivotGridControl1.OptionsView.HideAllTotals(); foreach (PivotGridField field in pivotGridControl1.Fields) { if (field.FieldName == ColName.TOTAL) { field.Appearance.Value.Options.UseTextOptions = true; field.Appearance.Value.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; } } pivotGridControl1.BestFit(); }
public static void SaveLayout(PivotGridControl pivotGrid, string pageID, string appPath) { string message = "Save Default Layout ?"; DialogResult result = MessageBox.Show(message, "Save Default Layout", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { string dirPath = string.Format("{0}\\DefaultLayOut", appPath); string fileName = string.Format("{0}.xml", pageID); XtraPivotGridHelper.SaveXml(pivotGrid, dirPath, fileName); } }
public static object[] StringToObjects(string str) { return(XtraPivotGridHelper.StringToObjects(str)); }
public static string GetFieldName(string fieldName) { return(XtraPivotGridHelper.GetFieldName(fieldName)); }