Hi... I have an already activated cell which is not in Edit Mode...
I'd like that when the user clicks on that cell a second time (not double click), the cell switch to Edit Mode...
Yeah, I was hoping I can avoid that inelegant solution.
Thanks for your time, Mike.
Oh, sorry. So the cell is selected before the MouseDown fires - that's unexpected.
In that case, I guess you need to store the last cell that was clicked in a form-level variable so you can track when it gets clicked the second time.
I already do that, see my code. The problem is: in MouseDown the cell is always selected.
That's easy. You don't really care about the number of clicks, you only care if the cell is already selected. So just check the cell.Selected property.
Thanks Mike, another tricky part is to distinguish between the first and second click.
On mouse down, the cell is already on the first click selected.
My code:
{
object cell = UIElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
}
This has the outcome that the cell goes in edit mode already on the first click, which is not what I want.