Hi,
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" />
<Nodes>
<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;
nodes.Add(nodeData);
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
<edit>
This post http://www.telerik.com/community/forums/aspnet-ajax/treeview/on-demand-loaded-non-checkable-nodes.aspx#673490
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
</edit>
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" />
<Nodes>
<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;
nodes.Add(nodeData);
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
<edit>
This post http://www.telerik.com/community/forums/aspnet-ajax/treeview/on-demand-loaded-non-checkable-nodes.aspx#673490
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
</edit>