Make node not selectable but expandable

10 posts, 2 answers
  1. John
    John avatar
    31 posts
    Member since:
    May 2011

    Posted 05 May 2011 Link to this post

    Is it possible to make a RadTreeView node not selectable but so that you can still expand it?
  2. Answer
    Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 06 May 2011 Link to this post

    Hi John,

    You can handle the ClientNodeClicked event and set it to node.set_selected(false). This way, the node will be expandable on dblClick, but never selected.


    Regards,
    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. John
    John avatar
    31 posts
    Member since:
    May 2011

    Posted 23 May 2011 Link to this post

    One more question on this...

    I have stopped items that I do not want to be selected by using node.set_selected(false) and that worked fine until I added a server-side OnNodeClick event. Now although the node is deselected it still continues to call the OnNodeClick event. How can I stop this event from hapenning?
     
  5. John
    John avatar
    31 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    One more question on this...

    I have stopped items that I do not want to be selected by using node.set_selected(false) and that worked fine until I added a server-side OnNodeClick event. Now although the node is deselected it still continues to call the OnNodeClick event. How can I stop this event from hapenning?
  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 26 May 2011 Link to this post

    Hello John,

    Please try to set AutoPostBack to false for the nodes whose OnNodeClick event you do not need to fire.

    Best wishes,
    Kate
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  7. John
    John avatar
    31 posts
    Member since:
    May 2011

    Posted 26 May 2011 Link to this post

    Tree View Nodes do not appear to have a property called AutoPostBack, only the Tree View control itself. Am I missing something?
  8. Answer
    Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 27 May 2011 Link to this post

    Hi John,

    "I have stopped items that I do not want to be selected by using node.set_selected(false) and that worked fine until I added a server-side OnNodeClick event. Now although the node is deselected it still continues to call the OnNodeClick event. How can I stop this event from hapenning?"
      - You can handle the ClientNodeClicking event and cancel the actual click - args.set_cancel(true). Also you will have to move the functionality from ClientNodeClicked event (since it will not fire after you cancel the click).


    Regards,
    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  9. Anders
    Anders avatar
    4 posts
    Member since:
    Feb 2016

    Posted 16 Feb Link to this post

    Why isnt there just a property of a RadTreeView, lets say NodesSelectable?

     In all threads about this in this forum, answers are formed like this: 

    _Try_ this: client side scripting solution, as in: "bash your head with some workaround solutions".

  10. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    282 posts

    Posted 18 Feb Link to this post

    Hi Anders,

    Currently the RadTreeNode object does not expose public property defining whether a node can be selected or not. If you think that this feature would add considerable value to the functionality of our RadTreeView control, you con log a Feature request in our public Feedback portal.

    Regards,
    Veselin Tsvetanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. Anders
    Anders avatar
    4 posts
    Member since:
    Feb 2016

    Posted 28 Feb in reply to Nikolay Tsenkov Link to this post

    That would be an ugly client side hack to compensate for lacking functionality.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017