B
Bill Styles
I've been trying to do some work with a datagrid control on a winform and
have gotten very frustrated with it. I need to be able to determine when
the user clicks on a given cell but can't find anything that seems to be
reliable.
The click and doubleclick events fire when the user clicks on the row or
column headers and *sometimes* when the user clicks on a particular cell. I
can't figure out any pattern to when it fires by clicking on a cell.
The CurrentCellChanged fires when the user clicks on a cell but ALSO when
the user clicks on a different row or column header so if they select a cell
and then click a column header to sort differently then it changes the
selection. I need to identify the last cell selected only and not have it
be affected by row or column clicks.
There are a lot of other things that should be simple that the datagrid
seems to make as difficult as possible but I've managed to work around
everything so far except the ability to select a cell. Any ideas will be
appreciated.
have gotten very frustrated with it. I need to be able to determine when
the user clicks on a given cell but can't find anything that seems to be
reliable.
The click and doubleclick events fire when the user clicks on the row or
column headers and *sometimes* when the user clicks on a particular cell. I
can't figure out any pattern to when it fires by clicking on a cell.
The CurrentCellChanged fires when the user clicks on a cell but ALSO when
the user clicks on a different row or column header so if they select a cell
and then click a column header to sort differently then it changes the
selection. I need to identify the last cell selected only and not have it
be affected by row or column clicks.
There are a lot of other things that should be simple that the datagrid
seems to make as difficult as possible but I've managed to work around
everything so far except the ability to select a cell. Any ideas will be
appreciated.