private void dgEvents_SelectionChanged(object sender, EventArgs e) { if (dgEvents.SelectedItems.Count > 0) { // Get the current select item GridEXRow selectedRow = dgEvents.SelectedItems[0].GetRow(); if (selectedRow.RowIndex != -1) { lastIndex = (uint)selectedRow.Cells["Index"].Value; // Do this asynchronously FillMessageDelegate del = new FillMessageDelegate(FillMessage); IAsyncResult result = del.BeginInvoke(selectedRow, null, null); } } }
private void dgEvents_SelectionChanged(object sender, EventArgs e) { if (dgEvents.SelectedRows.Count > 0) { // Get the current select item DataGridViewRow selectedRow = dgEvents.SelectedRows[0]; if (selectedRow.Index != -1) { lastIndex = (uint) selectedRow.Cells["Index"].Value; // Do this asynchronously FillMessageDelegate del = new FillMessageDelegate(FillMessage); IAsyncResult result = del.BeginInvoke(selectedRow, null, null); } } }