public DB(Account[] Accs,DataGridView DataGrid) { size = 0; _dataGrid = DataGrid; _db = new List<Account>(); foreach (Account a in Accs) { Add(a,size); size++; } _dataGrid.BeginInvoke((MethodInvoker)(() => _dataGrid.Rows.Add(size))); }
public static void HideDataGridViewVerticalScrollBar(DataGridView grid) { MethodInvoker update = delegate { try { grid.ScrollBars = ScrollBars.None; } catch (Exception ex) { BstLogger.Instance.Log(ex.ToString()); } }; try { grid.BeginInvoke(update); } catch (Exception ex) { BstLogger.Instance.Log(ex.ToString()); } }