Link to home
Start Free TrialLog in
Avatar of jindalee
jindalee

asked on

Sort column when clicking header in DataViewGrid

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?
Avatar of Ramone_Hamilton
Ramone_Hamilton
Flag of United States of America image

In which event are you calling your method to dsplay the dialog?
ASKER CERTIFIED SOLUTION
Avatar of Ramone_Hamilton
Ramone_Hamilton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jindalee
jindalee

ASKER

I'm using VB but is was easy to translate the C into VB

if e.RowIndex > -1 then
    do stuff
end if

Thank you