RexHeadlong
Programmer
I've got a derived DataGrid class and I need to be able to set the CurrentCell property to nothing.
I've used code I found on another website that sends a mousedown/mouseup message to the 0,0 pixel of the grid. This works in un-setting the CurrentCell, but the side-effect is that my mousedown and mouseup handlers get triggered, which is not a good thing in this case.
What I am really trying to do is to force the text box that is hosted by the grid column to lose its focus temporarily, so that listeners to the LostFocus event will be able to validate the contents of the cell.
So, I need a way to set the CurrentCell to nothing (without using mousedown/mouseup messages) or a way to unfocus the current cell's text box without putting any other cells into focus.
Anybody have any ideas?
Thanks in advance.
I've used code I found on another website that sends a mousedown/mouseup message to the 0,0 pixel of the grid. This works in un-setting the CurrentCell, but the side-effect is that my mousedown and mouseup handlers get triggered, which is not a good thing in this case.
What I am really trying to do is to force the text box that is hosted by the grid column to lose its focus temporarily, so that listeners to the LostFocus event will be able to validate the contents of the cell.
So, I need a way to set the CurrentCell to nothing (without using mousedown/mouseup messages) or a way to unfocus the current cell's text box without putting any other cells into focus.
Anybody have any ideas?
Thanks in advance.