private void SetMasterTableForRows(models.db.AbstractDatabase db) { views.grid.AbstractDBGridRow firstRow = null; foreach (var row in grid_.AllRowControls()) { if (firstRow == null) { row.SetMasterTables(db); firstRow = row; } else { row.CopyMasterTableContoller(firstRow); } } }
public DBPanelGridController(PanelGrid <Type> grid, bool newRowIsVisible) { table_ = null; new_row_ = null; sql_ = ""; ShowInvalidColumnValueMessage = true; grid_ = grid; grid_.UpdateRowsAction += (begin, end) => RefreshRows(begin, end, false); grid_.NewRowIsVisible = newRowIsVisible; foreach (var row in grid_.AllRowControls()) { row.Column_BeforeChangeValueAction += Column_BeforeChangeValue; row.Column_UpdateValueAction += Column_UpdateValue; row.Column_LostFocusAction += Column_LostFocus; row.RemoveAction += Row_Remove; row.Leave += Row_LostFocus; row.Enter += Row_GotFocus; row.SetStatusMessageAction += delegate(string msg) { if (SetStatusMessage != null) { SetStatusMessage(msg); } }; row.RowClicked += delegate(AbstractPanelGridRow sender) { if (RowClicked != null) { RowClicked(sender as Type); } }; } delayTimerController = new misc.DelayTimerController(); }