public DataGrid()
 {
     base.SetStyle(ControlStyles.UserPaint, true);
     base.SetStyle(ControlStyles.Opaque, false);
     base.SetStyle(ControlStyles.SupportsTransparentBackColor, false);
     base.SetStyle(ControlStyles.UserMouse, true);
     this.gridState = new BitVector32(0x42827);
     this.dataGridTables = new GridTableStylesCollection(this);
     this.layout = this.CreateInitialLayoutState();
     this.parentRows = new DataGridParentRows(this);
     this.horizScrollBar.Top = base.ClientRectangle.Height - this.horizScrollBar.Height;
     this.horizScrollBar.Left = 0;
     this.horizScrollBar.Visible = false;
     this.horizScrollBar.Scroll += new ScrollEventHandler(this.GridHScrolled);
     base.Controls.Add(this.horizScrollBar);
     this.vertScrollBar.Top = 0;
     this.vertScrollBar.Left = base.ClientRectangle.Width - this.vertScrollBar.Width;
     this.vertScrollBar.Visible = false;
     this.vertScrollBar.Scroll += new ScrollEventHandler(this.GridVScrolled);
     base.Controls.Add(this.vertScrollBar);
     this.BackColor = DefaultBackBrush.Color;
     this.ForeColor = DefaultForeBrush.Color;
     this.borderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.currentChangedHandler = new EventHandler(this.DataSource_RowChanged);
     this.positionChangedHandler = new EventHandler(this.DataSource_PositionChanged);
     this.itemChangedHandler = new ItemChangedEventHandler(this.DataSource_ItemChanged);
     this.metaDataChangedHandler = new EventHandler(this.DataSource_MetaDataChanged);
     this.dataGridTableStylesCollectionChanged = new CollectionChangeEventHandler(this.TableStylesCollectionChanged);
     this.dataGridTables.CollectionChanged += this.dataGridTableStylesCollectionChanged;
     this.SetDataGridTable(this.defaultTableStyle, true);
     this.backButtonHandler = new EventHandler(this.OnBackButtonClicked);
     this.downButtonHandler = new EventHandler(this.OnShowParentDetailsButtonClicked);
     this.caption = new DataGridCaption(this);
     this.caption.BackwardClicked += this.backButtonHandler;
     this.caption.DownClicked += this.downButtonHandler;
     this.RecalculateFonts();
     base.Size = new Size(130, 80);
     base.Invalidate();
     base.PerformLayout();
 }
 public DataGridView()
 {
     base.SetStyle(ControlStyles.UserMouse | ControlStyles.Opaque | ControlStyles.UserPaint, true);
     base.SetStyle(ControlStyles.SupportsTransparentBackColor, false);
     base.SetState2(0x800, true);
     this.dataGridViewState1 = new BitVector32(0);
     this.dataGridViewState2 = new BitVector32(0);
     this.dataGridViewOper = new BitVector32(0);
     this.dataGridViewState1[0x80001b] = true;
     this.dataGridViewState2[0x60003e7] = true;
     this.displayedBandsInfo = new DisplayedBandsData();
     this.lstRows = new ArrayList();
     this.converters = new Hashtable(8);
     this.pens = new Hashtable(8);
     this.brushes = new Hashtable(10);
     this.gridPen = new Pen(DefaultGridColor);
     this.selectedBandIndexes = new DataGridViewIntLinkedList();
     this.individualSelectedCells = new DataGridViewCellLinkedList();
     this.individualReadOnlyCells = new DataGridViewCellLinkedList();
     this.advancedCellBorderStyle = new DataGridViewAdvancedBorderStyle(this, DataGridViewAdvancedCellBorderStyle.OutsetDouble, DataGridViewAdvancedCellBorderStyle.OutsetPartial, DataGridViewAdvancedCellBorderStyle.InsetDouble);
     this.advancedRowHeadersBorderStyle = new DataGridViewAdvancedBorderStyle(this);
     this.advancedColumnHeadersBorderStyle = new DataGridViewAdvancedBorderStyle(this);
     this.advancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.Single;
     this.advancedRowHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.OutsetPartial;
     this.advancedColumnHeadersBorderStyle.All = DataGridViewAdvancedCellBorderStyle.OutsetPartial;
     this.borderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.dataGridViewState1[0x80] = true;
     this.selectionMode = DataGridViewSelectionMode.RowHeaderSelect;
     this.editMode = DataGridViewEditMode.EditOnKeystrokeOrF2;
     this.autoSizeRowsMode = DataGridViewAutoSizeRowsMode.None;
     this.autoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;
     this.columnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
     this.rowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.EnableResizing;
     this.clipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithAutoHeaderText;
     this.layout = new LayoutData();
     this.layout.TopLeftHeader = Rectangle.Empty;
     this.layout.ColumnHeaders = Rectangle.Empty;
     this.layout.RowHeaders = Rectangle.Empty;
     this.layout.ColumnHeadersVisible = true;
     this.layout.RowHeadersVisible = true;
     this.layout.ClientRectangle = base.ClientRectangle;
     this.scrollBars = System.Windows.Forms.ScrollBars.Both;
     this.horizScrollBar.RightToLeft = RightToLeft.Inherit;
     this.horizScrollBar.AccessibleName = System.Windows.Forms.SR.GetString("DataGridView_AccHorizontalScrollBarAccName");
     this.horizScrollBar.Top = base.ClientRectangle.Height - this.horizScrollBar.Height;
     this.horizScrollBar.Left = 0;
     this.horizScrollBar.Visible = false;
     this.horizScrollBar.Scroll += new ScrollEventHandler(this.DataGridViewHScrolled);
     base.Controls.Add(this.horizScrollBar);
     this.vertScrollBar.Top = 0;
     this.vertScrollBar.AccessibleName = System.Windows.Forms.SR.GetString("DataGridView_AccVerticalScrollBarAccName");
     this.vertScrollBar.Left = base.ClientRectangle.Width - this.vertScrollBar.Width;
     this.vertScrollBar.Visible = false;
     this.vertScrollBar.Scroll += new ScrollEventHandler(this.DataGridViewVScrolled);
     base.Controls.Add(this.vertScrollBar);
     this.ptCurrentCell = new Point(-1, -1);
     this.ptAnchorCell = new Point(-1, -1);
     this.ptMouseDownCell = new Point(-2, -2);
     this.ptMouseEnteredCell = new Point(-2, -2);
     this.ptToolTipCell = new Point(-1, -1);
     this.ptMouseDownGridCoord = new Point(-1, -1);
     this.sortOrder = System.Windows.Forms.SortOrder.None;
     this.lastMouseClickInfo.timeStamp = 0L;
     this.WireScrollBarsEvents();
     base.PerformLayout();
     this.toolTipControl = new DataGridViewToolTip(this);
     base.Invalidate();
 }