public CustomGridModel() { // Initial dimension RowCount = 1000; ColCount = 13; // initial row and column sizes Rows.DefaultSize = 18; Cols.DefaultSize = 70; Properties.GridLineColor = System.Drawing.Color.FromArgb(208, 215, 229); RowHeights[0] = 21; ColWidths[0] = 35; RowHeights.ResetModified(); ColWidths.ResetModified(); // fixed columns Cols.HeaderCount = 1; Cols.FrozenCount = 2; // standard base styles BaseStylesMap.RegisterStandardStyles(); GridStyleInfo standardStyle = BaseStylesMap["Standard"].StyleInfo; standardStyle.MergeCell = GridMergeCellDirection.RowsInColumn; GridStyleInfo rowHeaderStyle = BaseStylesMap["Row Header"].StyleInfo; //rowHeaderStyle.CellType = "Static"; rowHeaderStyle.MergeCell = GridMergeCellDirection.RowsInColumn; BaseStylesMap.Modified = false; CellModels.Add("CustomCell", new CustomCellModel(this)); // Other options Options.MergeCellsMode = GridMergeCellsMode.OnDemandCalculation | GridMergeCellsMode.MergeRowsInColumn; Options.SmoothControlResize = false; // At the momemnt the Excel-like selection feature is broken when using merge cells. Options.ExcelLikeCurrentCell = false; Options.ExcelLikeSelectionFrame = false; Options.GridVisualStyles = GridVisualStyles.Office2007Blue; Options.DefaultGridBorderStyle = GridBorderStyle.Solid; }
public PerformanceGridModel() { CommandStack.Enabled = false; Rows.DefaultSize = 17; Cols.DefaultSize = 65; RowHeights[0] = 21; ColWidths[0] = 35; RowHeights.ResetModified(); ColWidths.ResetModified(); Options.ExcelLikeCurrentCell = false; Options.ExcelLikeSelectionFrame = false; Options.AllowDragSelectedCols = false; Options.AllowDragSelectedRows = false; CommandStack.Enabled = false; Options.FloatCellsMode = GridFloatCellsMode.None; BaseStylesMap.RegisterStandardStyles(); }