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:
string Message = "Do you want to delete this record?";
string caption = "Notice";
DialogResult result;
result = MessageBox.Show(Message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
if (result == DialogResult.OK)
{
SystemDeleteRecord();
}
if (dtgFE1.DataSource != null)
{
dtgFE1.DataSource = RetrieveDataGridsData.GetFEData1();
dtgFE1.DataMember = "System";
}
else
{
MessageBox.Show("There are no more records associated with this call");
}