I have a DataGridView that pops up a dialog when a cell is clicked. The dialog displays information relevant to the selected row.
If I click the column header, the dialog is displayed even though I only want the DataGridView to be sorted. Once I close the dialog, the DataGRidView is displayed sorted.
How can I avoid displaying the dialog when the column header is displayed?