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
165
Prevent deselection
posted

Is there any way to prevent a user from deselecting a node. The treeView is configure to allow multiple selections. When the windows opens, some node are already selected, and I want to allow the user to select more nodes, without being able to unselect the ones that were selected at the load. 

  • 12773
    posted

    Hi,

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

    Sincerely,
    Dimi
    Developer Support Engineer, MCPD
    Infragistics, Inc.
    www.infragistics.com/support

  • 69832
    Suggested Answer
    Offline posted

    You can cancel the BeforeSelect event when one of these pre-selected nodes is in the UltraTree.SelectedNodes collection but not in the BeforeSelectEventArgs.NewSelections collection. Note that this will prevent the new selection from being applied altogether, not just prevent the pre-selected node(s) from being deselected.