Hello,
I'm trying to create custom attributes on a Radtreenode that is being build with the property ServerSideCallback. For some reason, when I create this node with node.Attributes.Add("key", "Value"), it keeps the attribute at first. But once it posts back and I access the node via the RadTreeNodeEventArgs e.Node. My attributes Count=0 and I have no keys available to access the value. If I change the node to ServerSide, everything works fine, however, this isn't what I want.
Any suggestions or thoughts would be great.
--This is where i create the node.
<code>
foreach (var zone in x)
{
RadTreeNode zoneNode = new RadTreeNode();
zoneNode.Text = String.Format("Zone {0}", zone.ZoneName);
zoneNode.Value = zone.NSD_ZoneID.ToString();
zoneNode.Expanded = false;
zoneNode.ExpandMode = TreeNodeExpandMode.ServerSide;
zoneNode.Attributes.Add("type", "OnDemand");
zoneNode.PostBack = true;
zoneNode.Checkable = false;
node.Nodes.Add(zoneNode);
}
</code>
<code>
//This is where the e.Node.Attributes.Count = 0;
protected void DPTTreeView_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
{
switch (e.Node.Attributes["type"])
{
...snip....
}
}
</code>