[RESOLVED] [2005] Clicking on empty datagrid view.
I have found that if you click on the blank space/background in a datagridview, the on click event is not fired if this datagridview has no cells. Do the same in a datagridview with a cell (still just clicking on the background, a cell is not selected) then the on click fires.
Any one know of a why this might be, and/or a way round
TIA
Rico
Re: [2005] Clicking on empty datagrid view.
You appear to be mistaken. I just tested a DataGridView with no columns and no rows, with column but without rows, and with both columns and rows. In all three tests the Click and MouseClick events of the grid were both raised when I clicked the grey background. If you can provide steps to reproduce this issue from scratch then I'll take another look, but as it is I can only assume that you're doing something wrong.
Re: [2005] Clicking on empty datagrid view.
Yes thanks, youre right as allways, turns out i wasn't adding the handlers when there wasn't any data in the datagridview. :o
Rico