Thursday, February 24, 2011

RadtreeView Nodes Font size Font size increases when Expanding

When you click on the expand button to view the child nodes the font of the child nodes are increased for each node. And you dont want to display in the increasing order and everythign should be in xx-small,
Ex:
Root(xx-small)
- Child1(x-small)
-Child1-1(Small)
- child1-1-1(Medium)


< style="FONT-SIZE: xx-small">
< id="rtvTreeView" runat="server" checkboxes="true" size="XX-Small" onnodeexpand="rtvTreeView_NodeExpand" enabledraganddrop="True" enabledraganddropbetweennodes="True" onnodedrop="rtvTreeView_NodeDrop">
< type="InQuint" duration="100">< /collapseanimation>
< type="None" duration="100">< /expandanimation>
< /telerik:radtreeview>
< /div>

Even if you give the Font-size XX-small in div or inside the telerik :radtreeview tag it wont take it.So assignt the Font size before binding to the each node.

Telerik.Web.UI.RadTreeNode subnode = new Telerik.Web.UI.RadTreeNode(fullname, userid.ToString());
subnode.Attributes.Add("nodetype", "user");
subnode.ExpandMode = Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack;
subnode.Checkable = false;
subnode.Font.Size= FontUnit.xx-small;
parentnode.Nodes.Add(subnode);

No comments:

Post a Comment