public static void grid_Scroll_RepositionHeaderCheckboxLocation(object sender, ScrollEventArgs e, DataGridView grid, DataGridViewColumn column, CheckBox checkboxHeader) { if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll) { if (checkboxHeader.Location.X < 0) { checkboxHeader.Visible = false; } else { checkboxHeader.Visible = true; } Tools.setHeaderCheckboxLocation(grid, column, checkboxHeader); } }
public static void grid_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e, DataGridViewColumn column, CheckBox checkboxHeader) { Tools.setHeaderCheckboxLocation((DataGridView)sender, column, checkboxHeader); }