Hi,
Is there a way to keep a XamDataTreeNode to stay in edit mode, even if it looses focus?
My suspicion is that some other control takes the focus away from the node immediately after it has gone into edit mode.
private void sequenceView_InitializeNode(object sender, Infragistics.Controls.Menus.InitializeNodeEventArgs e) { e.Node.IsExpanded = true; if (e.Node.Data == ViewModelLocator.ViewModel.MyObject) { // IsOnNodeActiveEditingEnabled="True" e.Node.IsActive = true; } } private void sequenceView_NodeEnteringEditMode(object sender, Infragistics.Controls.Menus.BeginEditingNodeEventArgs e) { if (e.Node.Data != ViewModelLocator.ViewModel.MyObject) { // Keep other objects not in scope from going into edit mode e.Cancel = true; } } private void sequenceView_NodeExitingEditMode(object sender, Infragistics.Controls.Menus.TreeExitEditingEventArgs e) { // e.EditingCanceled is true? why? This event is called immediately after e.Node.IsActive is set to true in InitializeNode }
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
Hi Stefan, that solved it! Thank you for the sample!
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.