private void CustomerTableView_InitNewRow(object sender, InitNewRowEventArgs e) { var row = CustomerGrid.GetRow(e.RowHandle) as Customer; row.RowState = Convert.ToInt16(ERowState.Active); FocusedCustomer = row; CustomerGrid.Focus(); OnPropertyChanged("IsDataModified"); }
public void Load(int contactID) { Customers = _dc.Customer.Where(x => x.RowState == Convert.ToInt16(ERowState.Active)); if (_dc.Contact.Any(x => x.ID == contactID)) { ContactGrid.Focus(); FocusedContact = _dc.Contact.Single(x => x.ID == contactID); FocusedCustomer = FocusedContact.Customer; } else { CustomerGrid.Focus(); }; }