Check node in Treeview On Demand

3 posts, 0 answers
  1. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 10 Nov 2008 Link to this post


    I've almost got this Treeview Loaded On Demand working!!

    My last question is how do you check a node that you load on-demand. I've tried CheckState, Checked, Checkable but no luck.

    I cant find a sample that demonstrates how to check a node loaded on demand

    My aspx:

      <telerik:RadTreeView runat="server" ID="RadTreeView1"
                 OnNodeDataBound="RadTreeView1_NodeDataBound" CheckBoxes="true" CheckChildNodes="true"  
                LoadingStatusPosition="None" PersistLoadOnDemandNodes="false" EnableViewState="false"
                Style="float: left" OnClientNodeClicked="onNodeClicked" Width="300px">
                <WebServiceSettings Method="GetTreeViewNodes" Path="~/PopulateTreeview.asmx" />
                <telerik:RadTreeNode Text="mgpage_BalanceSheet" Checked="true" Value="1" ExpandMode="WebService"> </telerik:RadTreeNode>

    My Code behind:

    [WebMethod(EnableSession = true)]
            public List<NodeData> GetTreeViewNodes(RadTreeNodeData node)
                DataTable dt = Helper.ConfigurationHelper.GetCofiguration(node.Text);
                List<NodeData> nodes = new List<NodeData>();
                NodeData nodeData = new NodeData();
                foreach (DataRow dr in dt.Rows)

     foreach (DataRow dr in dt.Rows)
                    nodeData = new NodeData();
                    nodeData.Text =  dr["DisclosureCode"].ToString();
                    nodeData.Value = dr["DisclosureCodeId"].ToString();
                    nodeData.ExpandMode = TreeNodeExpandMode.WebService;
                    nodeData.CheckState  = TreeNodeCheckState.Checked;
                    nodeData.Checkable = true;
                    nodeData.Checked = true;


            public class NodeData
                public string Value { get; set; }
                public string Text { get; set; }
                public TreeNodeCheckState CheckState { get; set; }
                public bool Checked { get; set; }
                public bool Checkable { get; set; }
                public TreeNodeExpandMode ExpandMode { get; set; }

    thanks in advance

    This post
    recommends the latest Telerik DLL 2008.3.1105.35 and that resolves the problem.. no wonder it was doing my head in.

    I see the FindNodeByText and FindNodeByValue, have second boolean parameter ignoreCase.. unfortunalely with the latest DLL I can still produce the StackOverFlow

  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 14 Nov 2008 Link to this post

    Hi Jeremy,

    I am glad that the problem with the Checked property is now resolved.

    As for the other problem with FindNodeByText and FindNodeByValue methods I noticed that you have opened another post, so lets close this one.

    Sincerely yours,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 29 Dec 2008 Link to this post

    Hi Veselin ,

    Sure archive this case and have a happy new year!

    I've written some great doco's using telerik controls for project hand-overs, I'll try and get around to collecting them.. and submitting some:)

    For everyone's reference, the link to the open case is: , which I am happy to report is solved:)

    Cheers Jerermy Lecky-Thompson

    ps I'll remain Subscribed to this thread.
Back to Top