private void reportsGrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { var grid = sender as DataGridView; if (grid != null) { var data = grid.DataSource as IEnumerable <ViewModel.TicketDetail>; var ticket = data.Skip(e.RowIndex).First(); var ticketEdit = new EditTicket(); ticketEdit.DataSource = ticket; ticketEdit.Show(); } }
private void reportsGrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { var grid = sender as DataGridView; if (grid != null) { var data = grid.DataSource as IEnumerable<ViewModel.TicketDetail>; var ticket = data.Skip(e.RowIndex).First(); var ticketEdit = new EditTicket(); ticketEdit.DataSource = ticket; ticketEdit.Show(); } }