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 Reply Children
No Data