Open msasso69 opened 6 years ago
Hey @msasso69, thanks for reporting the issue.
I think doing an async invoke might be the right solution here, since all platforms behave identically (except winforms).
However, instead of Task.Run(() => Application.Instance.Invoke(() => { ... }));
, you can just simply use Application.Instance.AsyncInvoke(() => { ... });
, which is essentially the same thing but without spawning a background thread.
I'm trying to implement a grid with a button that when pressed lets me edit the content of a cell in the same row, something like this:
The problem is that when I click on the image with the pencil and execute the BeginEdit for the cell on the left, somehow also the event CellEdited for the same cell gets fired. This is probably because I'm doing it from another cell, so Eto understands that I already left the cell being edited.
In order to achieve what I wanted, in the code I execute when I click the cell with the button, I had to execute the BeginEdit in a code like this:
but it's an ugly workaround and doesn't look to me very efficient, though it works.
Expected Behaviour
If I execute the BeginEdit for a cell from the code executed when clicking on another cell the CellEdited event for the cell being edited should not be fired, the CellEdited should be fired only after editing (leaving) the cell subject of the BeginEdit.
Actual Behavior
If I execute the BeginEdit for a cell from the code executed when clicking on another cell the CellEdited event is also fired, makeing it impossible to edit the desired cell.
Steps to Reproduce the Problem
you get this:
instead of this:
Code that Demonstrates the Problem
Specifications