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
1250
WebDataTree focus problem
posted

Hi,

I use WebDataTree on my page,

The nodes can contain quite long text.

Tthe width of WebDataTree is limited so the horizontal scroll bar appers. It is fine. (see picture 1)

But if I select the node  the scroll moves to the right. (see picture 2)

I want to prevent such behaviour because it is inconvenient for users.  (UltraWebTree didn't do that)

How can I prevent such behaviour?

 

 

 

Parents
No Data
Reply
  • 15979
    posted

    Hello AlexanderZh,

    One possible way is to apply CSS class to the node that will reduce the width of the text itself.

    Currently the tree does not have integrated ability to wrap the text of the nodes and we are working to provide such functionality.

    What you can do in this scenario (since scrolling to the end of text is the default behavior) is to use JavaScript to keep the scroll on the left like this:

    function NavigationDetails_SelectionChanged(sender, eventArgs)

    {

        var tree = sender.get_element();

     

        tree.scrollLeft = 0;

    }

     

    Test this approach and let me know what the result on your setup is.

Children