/// ------------------------------------------------------------------------------------ protected override void OnHandleDestroyed(EventArgs e) { if (!DesignMode) { Settings.Default[_gridColSettingPrefix + "ComponentGrid"] = GridSettings.Create(_grid); } base.OnHandleDestroyed(e); }
/// ------------------------------------------------------------------------------------ protected override void OnColumnWidthChanged(DataGridViewColumnEventArgs e) { base.OnColumnWidthChanged(e); if (_resizingColumnHeaders) { return; } BeginInvoke((Action)ResizeColumnHeaders); // If this control doesn't have focus or all three standard columns have not yet // been added, the resize is not the result of the user dragging the column divider. if (ContainsFocus && ColumnCount >= 3) { Settings.Default.SegmentGrid = GridSettings.Create(this); } }