muhammadantoniussony
May 29, 2020, 4:48 AM
Greeting ....
I use this code to refresh my tree ..
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Barang.aspx.cs" Inherits="WebApplication1.Setup.Barang" %>
<script runat="server">
[DirectMethod]
public string RefreshMenu()
{
Ext.Net.NodeCollection nodes = this.BuildTree(null);
return nodes.ToJson();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
var refreshTree = function (tree) {
App.direct.RefreshMenu({
success: function (result) {
var nodes = eval(result);
if (nodes.length > 0) {
tree.setRootNode(nodes[0]);
}
else {
tree.getRootNode().removeAll();
}
}
});
};
</script>
</head>
I get that code from Ext.Net example #/TreePanel/Basic/Refresh_Static_Tree/ (https://examples5.ext.net/#/TreePanel/Basic/Refresh_Static_Tree/)
and build tree using Ext.Net example #/TreePanel/Loaders/Direct_Method/ (https://examples5.ext.net/#/TreePanel/Loaders/Direct_Method/)
it look like
25354
but after refresh using that code above, my tree become like this
25355
is there any solution .... ???
Thank's ....
I use this code to refresh my tree ..
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Barang.aspx.cs" Inherits="WebApplication1.Setup.Barang" %>
<script runat="server">
[DirectMethod]
public string RefreshMenu()
{
Ext.Net.NodeCollection nodes = this.BuildTree(null);
return nodes.ToJson();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
var refreshTree = function (tree) {
App.direct.RefreshMenu({
success: function (result) {
var nodes = eval(result);
if (nodes.length > 0) {
tree.setRootNode(nodes[0]);
}
else {
tree.getRootNode().removeAll();
}
}
});
};
</script>
</head>
I get that code from Ext.Net example #/TreePanel/Basic/Refresh_Static_Tree/ (https://examples5.ext.net/#/TreePanel/Basic/Refresh_Static_Tree/)
and build tree using Ext.Net example #/TreePanel/Loaders/Direct_Method/ (https://examples5.ext.net/#/TreePanel/Loaders/Direct_Method/)
it look like
25354
but after refresh using that code above, my tree become like this
25355
is there any solution .... ???
Thank's ....