Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
UltraTree Bounded Label Edit Validation event StayInEditMode does not retain the focus unless Cancel = true
posted

Hi  

I have bounded list on UltraTree, which is using Standard View Style. I have some code in Edit Label validation event, Where I try cancel the event try to keep label in edit mode.

I have this code in ValidateLabelEdit(object sender, ValidateLabelEditEvent)

if (!match.Success)
{
e.StayInEditMode = true;
//e.Cancel = true;
MessageBox.Show("Invalid );
return;
}

It gets back the cursor to label edit only when e.Cancel = true is commented out, that is fine but now it does triggers the ValidateLabelEdit event again when I press any key.

Basically In stacktrace i see that, since this tree is bounded to collection, that has some subcription on keypress, so it end up in showing Invalid message twice.

How to get rid of onkeypress of bounded node event trigger ?