Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 public static object[] StringToObjects(string str)
 {
     return(XtraPivotGridHelper.StringToObjects(str));
 }
Ejemplo n.º 4
0
 public static string GetFieldName(string fieldName)
 {
     return(XtraPivotGridHelper.GetFieldName(fieldName));
 }