void BtnEditRow_Click(object sender, RoutedEventArgs e) { BidStatus bidStatus = dgvBidStatus.SelectedItem as BidStatus; if (bidStatus == null) { return; } BidStatusSaveWindow window = new BidStatusSaveWindow(bidStatus); window.ShowDialog(); }
//Дабл клик по строке таблицы - открывает окно редактирования private void RowDoubleClick(object sender, MouseButtonEventArgs e) { DataGridRow row = sender as DataGridRow; BidStatus bidStatus = row.Item as BidStatus; if (bidStatus == null) { return; } BidStatusSaveWindow window = new BidStatusSaveWindow(bidStatus); window.ShowDialog(); viewSource.View.Refresh(); dgvBidStatus.CurrentCell = new DataGridCellInfo(row.Item, dgvBidStatus.CurrentCell.Column); }
void BtnAdd_Click(object sender, RoutedEventArgs e) { BidStatusSaveWindow window = new BidStatusSaveWindow(); window.ShowDialog(); }