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
200
XamDataTree and Edit Mode
posted

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
        }

Parents
  • 138253
    Verified Answer
    Offline posted

    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.

    XamDataTreeEditing.zip
Reply Children