RadTreeView (check all nodes / uncheck all nodes)

11 posts, 0 answers
  1. thomas
    thomas avatar
    8 posts
    Member since:
    Mar 2009

    Posted 12 May 2009 Link to this post

    Hi all,

    i'm rendering a checkbox tree view with 2 levels of hierarchy (rootnodes and subnodes, but no more subnodes beyond the first subnode) and i've added two hyperlinks who have an eventhandler onclick to check all or uncheck all nodes:

    function selectallnodes(value) {
        var o = $find(value); //value = ClientID (string value) for the RadTreeView
        var nodes = o.get_nodes();
        var count = nodes.get_count();
        for (var i = 0; i < count; i++) {
            nodes.getNode(i).check();
        }
    }

    The total of rootnodes is 52 and the global total of nodes = 256...
    It runs fine in firefox but when it runs in IE 6 or IE 7 i get an warning messagebox (yes no) that says :
    "A script on this page is causing internet explorer to run slowly, if it continues to run your computer may become unresponsive. Do you want to abort the script?"
    Is there any overhead with the nodes.getNode(i) ??? Or an alternative?
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 12 May 2009 Link to this post

    Hi thomas,

    You can try the current internal build. We recently released a hotfix which resolves a performance issue when checking lots of nodes.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. thomas
    thomas avatar
    8 posts
    Member since:
    Mar 2009

    Posted 13 May 2009 Link to this post

    Hi,

    is there another solution? Because at the moment I'm working on a proof of concept, if it will be accepted then licenses will be bought...

    Thx anyway!
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hello thomas,

    You can still download a trial version of the internal build. You don't need a license for that.

    On the other hand I couldn't reproduce the timeout even with the official version (tested in IE7 only however). It depends on the performance of the PC as well. Could you open a support ticket and send the page which times out at your side?

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. thomas
    thomas avatar
    8 posts
    Member since:
    Mar 2009

    Posted 13 May 2009 Link to this post

    I'm combining it with sharepoint, i've made a custom field that lists all departments and sub departments. What do you want to see? The html output? The javascript I've already mentioned...
  7. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hi thomas,

    I would appreciate it if you send us a  runnable page which times out in the same way as your real scenario.
    So far I couldn't reproduce the timeout even with twice as much nodes. I am sending you my test page. Does it time out at your side?


    Sincerely yours,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. thomas
    thomas avatar
    8 posts
    Member since:
    Mar 2009

    Posted 13 May 2009 Link to this post

    If you want i can send you the source code for my custom field, if you'd give me your mail message. But it doesn't happen on all computers, and not all the time...
  9. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hello thomas,

    You need to open a support ticket in order to send us files. I cannot give you my email in a public forum thread. I suggest you first try the internal build which has performance optimizations with regards to checking nodes. Also did you try the web site I've sent? Does it work as expected?

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. thomas
    thomas avatar
    8 posts
    Member since:
    Mar 2009

    Posted 13 May 2009 Link to this post

    I've found what can be the problem, I'm getting the same error if i run your code.
    If the RadTreeView.CheckChildNodes = false then I don't get that message box appear, otherwise it shows in IE6 / IE7...
    But it runs in Sharepoint context, jquery loaded and on virtual machine at the moment.
  11. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 13 May 2009 Link to this post

    Hello thomas,

    Running on virtual PC is probably the issue. The only workaround I can propose is upgrading to the latest internal build.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. fred williams
    fred williams avatar
    55 posts
    Member since:
    Feb 2010

    Posted 13 May Link to this post

    If you're using JQuery,

     

    $('.rtChk').prop('checked',false)

     

    or

    $('.rtChk').prop('checked',true)

     

    works and works efficiently. 

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017