public SplitterFrame() { model = new GridModel(); SampleGrid.SetupGridModel(model); InitializeComponent(); grid1.Model = model; grid1.GridVisualStyles = GridVisualStyles.Metro; }
public GridFrame(GridModel model) { this.model = model; SampleGrid.SetupGridModel(model); InitializeComponent(); grid1.Model.SelectionChanging += new GridSelectionChangingEventHandler(grid1_SelectionChanging); this.grid1.CurrentCell.MoveTo(1, 1); grid1.Model = model; }
public GridDialog() { // // Required for Windows Form Designer support // model = new GridModel(); SampleGrid.SetupGridModel(model); InitializeComponent(); grid1.Model = model; bool transparent = true; bool alpablend = false; if (transparent) { // Transparent if (alpablend) { // I can either do alphablending grid1.SupportsTransparentBackColor = true; grid1.TableStyle.Interior = new BrushInfo(Color.FromArgb(50, 204, 212, 230)); } else { // or tell grid not to draw background of cells grid1.TransparentBackground = true; } // (grid.TransparentBackground completely disables background drawing for all cells // whereas SupportsTransparentBackColor = true together with TransparentBackground // lets me do alphablending). Type type = typeof(Bitmap); System.IO.Stream stream = typeof(SampleGrid).Module.Assembly.GetManifestResourceStream(ApplicationMain.manifestNamespace + "logo_800_edf0f7.jpg"); Bitmap bm = new Bitmap(stream); grid1.BackgroundImage = bm; grid1.GridVisualStyles = Windows.Forms.GridVisualStyles.Metro; } // attach my own scrollbars to grid grid1.HScrollBehavior = GridScrollbarMode.Shared; grid1.VScrollBehavior = GridScrollbarMode.Shared; grid1.UseSharedScrollBars = true; grid1.VScrollBar.InnerScrollBar = this.vScrollBar1; grid1.HScrollBar.InnerScrollBar = this.hScrollBar1; grid1.VerticalThumbTrack = true; grid1.HorizontalThumbTrack = true; grid1.Model.EnableGridListControlInComboBox = false; // Have grid not occupy the whole client rectangle // Rectangle r = grid1.ClientRectangle; // r.Inflate(-20, -20); // grid1.GridBounds = r; }
public SplitterFrame() { model = new GridModel(); SampleGrid.SetupGridModel(model); InitializeComponent(); if (DpiAware.GetCurrentDpi() > 96) { this.CaptionBarHeight = (int)DpiAware.LogicalToDeviceUnits(this.CaptionBarHeight); } grid1.Model = model; grid1.GridVisualStyles = GridVisualStyles.Metro; }
//private bool inUpdate = false; //private int savedRecord = -1; #endregion #region Constructor public RecordFrame() { model = new GridModel(); SampleGrid.SetupGridModel(model); InitializeComponent(); grid1.Model = model; this.grid1.CurrentCell.MoveTo(1, 1); this.grid1.GridVisualStyles = GridVisualStyles.Metro; model.EnableGridListControlInComboBox = false; }
public GridFrame() { model = new GridModel(); SampleGrid.SetupGridModel(model); InitializeComponent(); grid1.Model.SelectionChanging += new GridSelectionChangingEventHandler(grid1_SelectionChanging); this.grid1.CurrentCell.MoveTo(1, 1); grid1.Model = model; grid1.Model.EnableGridListControlInComboBox = false; grid1.GridVisualStyles = Windows.Forms.GridVisualStyles.Metro; }
//private bool inUpdate = false; //private int savedRecord = -1; #endregion #region Constructor public RecordFrame() { model = new GridModel(); SampleGrid.SetupGridModel(model); InitializeComponent(); if (DpiAware.GetCurrentDpi() > 96) { this.CaptionBarHeight = (int)DpiAware.LogicalToDeviceUnits(this.CaptionBarHeight); } grid1.Model = model; this.grid1.CurrentCell.MoveTo(1, 1); this.grid1.GridVisualStyles = GridVisualStyles.Metro; model.EnableGridListControlInComboBox = false; }
// Sample code for inserting a work sheet. protected override void OnCellDoubleClick(GridCellClickEventArgs e) { WorkbookForm form = FindForm() as WorkbookForm; if (form != null) { WorkbookModel workbook = form.WorkbookView.Workbook; GridModel sheet3 = new SampleGridModel(); SampleGrid.SetupGridModel(sheet3); WorksheetModel workSheetModel = new WorksheetModel(workbook, "Sheet 3", sheet3); workbook.Worksheets.Add(workSheetModel); form.WorkbookView.ActivePage = form.WorkbookView.TabBarPages[workbook.Worksheets.Count - 1]; } base.OnCellDoubleClick(e); }