private void DataGV_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { int index = e.RowIndex; if (index > 0) { DataGV.ClearSelection(); DataGV.Rows[index].Selected = true; } }
private void Fill() { DataGV.Rows.Clear(); DataGV.ClearSelection(); FillCategoriesHierarchy(null, "", true); WareCategoriesLogic cl = new WareCategoriesLogic(manager); DataGV.AutoGenerateColumns = false; DataGV.DataSource = items;//cl.GetAll(); DataGV.Update(); }