コード例 #1
0
        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();
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: mariobot/nAssembla
 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();
     }
 }