Hi everyone,
I have a problem with ServerSideCallback. I want to modify some properties of the node which fired the NodeExpand event in the same one.
| protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e) |
| { |
| IList<EntityTypeDataContract> list = GetList(e); |
| if (list.Count > 0) |
| { |
| foreach (EntityTypeDataContract type in list) |
| { |
| RadTreeNode treeNode = new RadTreeNode(type.DisplayName, type.Value); |
| treeNode.Expanded = false; |
| treeNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; |
| e.Node.Nodes.Add(treeNode); |
| } |
| } |
| else |
| { |
| e.Node.Expanded = false; |
| e.Node.ExpandMode = TreeNodeExpandMode.ClientSide; |
| } |
| } |
The problem is until there will be a postback on the page, the state of the triggering node is not change (Expanded = true and ExpandMode = ServerSideCallback). It seems there is no refresh of the already created node during the callback ?
This sample of code works well with ServerSide expand mode but I really need the ServerSideCallBack mode.
Thanks for helping me to solve this problem.
Regards,
Sebastien