Feb 16, 2011, 5:55 AM
How can i refresh the Treepanel in server side
Hi,
I am binding the tree dynamically with this code.
Please give me the reply.How i can refresh it ?
I am binding the tree dynamically with this code.
if (!X.IsAjaxRequest)
{
Ext.Net.TreeNode treeNode = new Ext.Net.TreeNode();
treeNode.Text = "Categories";
TreePanel2.Root.Add(GetNodes(0, treeNode));
treeNode.Expanded = true;
}
private Ext.Net.TreeNode GetNodes(int Row, Ext.Net.TreeNode treeNode)
{
DrmsDBDataContext db = new DrmsDBDataContext();
var lst = from p in db.FoodMenuCategories where p.ParentID == Row select p;
foreach (FoodMenuCategory fc in lst)
{
Ext.Net.TreeNode treeNode2 = new Ext.Net.TreeNode();
treeNode2.NodeID = fc.FDMenuCatID.ToString();
treeNode2.Text = fc.FDMenuCatName;
treeNode2.Qtip = fc.FDMenuCatName;
treeNode2.NodeID = fc.FDMenuCatID.ToString();
var lst1 = from p in db.FoodMenuCategories where p.ParentID == fc.FDMenuCatID select p;
if (lst1.Count() > 0)
GetNodes(fc.FDMenuCatID, treeNode2);
treeNode.Nodes.Add(treeNode2);
}
return treeNode;
}
First i binded the tree with category name.when we add the new category,i want to refresh the treepanel dynamically.i used this codeTreepanel.Reload();
I can't use (https://examples1.ext.net/#/TreePane...h_Static_Tree/) refresh static tree example.First i am calling one direct method for the save function after that only i want to refresh the tree panel.when i call handler,handler will work first,after that only direct method will work.Suggest any idea please.................................Please..... ...........................help................... ..Please give me the reply.How i can refresh it ?
Last edited by NishaLijo; Feb 16, 2011 at 7:56 AM.