I'm fairly new at working with datagrids and this problem is bugging the hell out of me. Can someone please lead me in the right direction as to how to prevent a user from double clicking a column header. The following code reflects what is supposed to happen when the user double clicks the grid,but i get a massive error when people double click on the column headers:
CellToDelete = dtgFE1.Rows[e.RowIndex].Cells.FormattedValue.ToString();
string Message = "Do you want to delete this record?";
string caption = "Notice";
result = MessageBox.Show(Message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
if (result == DialogResult.OK)
if (dtgFE1.DataSource != null)
dtgFE1.DataSource = RetrieveDataGridsData.GetFEData1();
dtgFE1.DataMember = "System";
MessageBox.Show("There are no more records associated with this call");
Any help would absutely be appreciated.
Thanks in advance.