Jan 15, 2013, 8:15 AM
[CLOSED] TreePanel & TreeStore setRootNode() not working anymore?
Hi guys,
I just updated the source of Ext. Good to see beta2 is bound to this update.
Bad to know the following code not working anymore. Any ideas?
I just updated the source of Ext. Good to see beta2 is bound to this update.
Bad to know the following code not working anymore. Any ideas?
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body id="theBody">
<form runat="server">
<ext:ResourceManager ID="theManager" runat="server"
IDMode="Static"
Theme="Default"
ShowWarningOnAjaxFailure="false"
DirectMethodProxy="Ignore"
ScriptMode="Debug" />
<ext:TreePanel runat="server" ID="tp" Width="200" Height="400">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="TEST">
<Listeners>
<Click Handler="testFunc(#{tp},#{ts});" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Store>
<ext:TreeStore runat="server" ID="ts" />
</Store>
<Root>
<ext:Node Text="[root]" EmptyChildren="true" Leaf="true" />
</Root>
</ext:TreePanel>
</form>
<script type="text/javascript">
var testFunc = function (tp, ts) {
var root = {
text: "XX",
leaf: false,
children: [
{ text: "A", leaf: true },
{ text: "B", leaf: true }
]
};
tp.setRootNode(root);
tp.getView().refresh();
window.alert("done");
};
</script>
</body>
</html>
<script runat="server">
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
</script>
Last edited by Daniil; Jan 15, 2013 at 3:16 PM.
Reason: [CLOSED]