I have a textbox and a grid displaying 10 lines of item.
First, I modified data in grid.
Then while editing the second line of data, I found clicking out of the grid will not set the focus out from the grid.
Why and How can I set the grid out from edit mode when I click out of the grid?
Please advice, Thanks.
use the lost focus event when going to other control (i.e. button, textbox...) (p.s. you have to add the event's method in the constructor or on form load. check the sample)
and the form click event when clicking outside.
Hi Hady,
I did added in the LostFocus but it is not get trigger as well.
Can you checked why is it?
Attached is my sample application.
Many thanks.
Crystal
you can set it on the grid lost focus event to trigger the exiteditmode when other controls got focus, and keep the form mouse click to trigger when no other control get focus
If the forms have many other controls, is it I had to add this mouse click event to all other controls in order to force ultragrid to trigger the ExitEditMode event?
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);
}