Checking nodes from CodeBehind / Javascript

12 posts, 0 answers
  1. Eric
    Eric avatar
    16 posts
    Member since:
    Feb 2013

    Posted 28 Feb 2013 Link to this post

    Hello,

    I'm trying to have some nodes checked but can't figure out how to do it. I save the checked nodes in my database, but then I can't check those nodes when loading from the database?

    How can I do this?
  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 04 Mar 2013 Link to this post

    Hi Eric,

    It is not possible to pre-select or check a node in the code behind and respectively create an entry.The control relies only on user interaction in its first version. For the next release we are going to expose functionality to create entry during NodeDataBound server side event.

    Regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hank
    Hank avatar
    3 posts
    Member since:
    Mar 2013

    Posted 21 Mar 2013 Link to this post

    Would it be possible to do with JAVAScript, if so how? I'm currently working on a project and being able to have a node selected based on what is in a database would be a huge help.

    Thanks!
  5. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 22 Mar 2013 Link to this post

    Hello Hank,

    After 2 weeks our service pack will be available and that functionality to create entry from dropdown node will be included. In case that you need to test you project before that you could use our internal build. Here is an example:
    void RadDropDownTree1_NodeDataBound(object sender, Telerik.Web.UI.DropDownTreeNodeDataBoundEventArguments e)
    {
        if (e.DropDownTreeNode.Text == "Text2")
            e.DropDownTreeNode.CreateEntry();
    }


    Kind regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Ian
    Ian avatar
    2 posts
    Member since:
    Mar 2013

    Posted 31 Mar 2013 Link to this post

    Hi Peter,

    I desperately need this functionality.  Is there an updated ETA or possibility to get pre-release code?  I have a demo on Tuesday!

    Thank you.
  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 01 Apr 2013 Link to this post

    Hello,

    I prepared a sample page for you. Please test the attachment and let me know if it works for you. The example shows how to create an entry during the NodeDataBound event based on some criteria. The project requires the 2013.1.326.40 build.

    Regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Ian
    Ian avatar
    2 posts
    Member since:
    Mar 2013

    Posted 01 Apr 2013 Link to this post

    Thank you Peter,

    I was able to update the DLLs and reference the CreateEntry() method but am having some issues with the version change.  I replied on my support ticket.  Really appreciate the rapid response!!

    --ian
  9. Marcelino
    Marcelino avatar
    4 posts
    Member since:
    Jul 2012

    Posted 02 Apr 2013 Link to this post

    Hello,

    I am looking for this same functionality. I downloaded your sample and I cant find the .createEntry Method.

    I opened my -Telerik Control Panel- and the build is 2013.1.220 . How can I get the build you mention?

    thanks!

    Update: Found it on the control panel on the site.

    Another quick question, when you plan to have next release?

    thanks once again
  10. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 04 Apr 2013 Link to this post

    Hi Marcelino,

    Yesterday we released Q1.2013 Service Pack 1. The CreateEntry and many new improvements are included. You could review our demos. Now, it should be available on our web site for download. The major release - Q2.2013 will be in June.

    Regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  11. Santhosh
    Santhosh avatar
    16 posts
    Member since:
    Feb 2013

    Posted 20 Dec 2013 Link to this post

    hi,

    Can you help me out regarding this ,I am Getting M is null error in javascript if i removed checked item from radtreeview.


    thanks,
    santhosh
  12. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Dec 2013 Link to this post

    Hi Santhosh,

    Please have a look into the following JavaScript which works fine at my end. 

    JavaScript:
    <script type="text/javascript">
        function Delete() {
            var tree = $find("<%=RadTreeView1.ClientID %>");
            for (var i = 0; i < tree.get_allNodes().length; i++) {
                if (tree.get_allNodes()[i].get_checked() == true) {
                    tree.get_allNodes()[i].set_visible(false);
                }
            }
        }
    </script>

    Please provide your code if it doesn't help.
    Thanks,
    Shinu.
  13. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 25 Dec 2013 Link to this post

    Hello Santhosh,

    There is a server side method which syncs the embedded tree and the control when there is a change. Here you could find more information. In case that you are at the client side you could use the approach suggested by Shinu.

    Regards,
    Peter Filipov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017