Sep 21, 2011, 12:03 PM
Treepanel beforeload event problem
Hi friends,
i am using treepanel, i am facing problem in beforeload listener...sometimes it working fine...sometimes the method is not at all calling..(i observed this behaviour when i clicked four or five nodes one after another)can u tell me what could be the problem.. Below is the code of my treepanel
please help me ..why beforeload event is not firing sometimes...
i am using treepanel, i am facing problem in beforeload listener...sometimes it working fine...sometimes the method is not at all calling..(i observed this behaviour when i clicked four or five nodes one after another)can u tell me what could be the problem.. Below is the code of my treepanel
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:TreePanel ID="TreePanel1" runat="server" Title="Tree" AutoHeight="true" Border="false"
RootVisible="false" SingleExpand="true" TrackMouseOver="true" Icon="ChartOrganisation">
<Root>
<ext:AsyncTreeNode NodeID="0" Text="Root" />
</Root>
<Listeners>
<BeforeLoad Fn="nodeLoad" />
<Click Fn="nodeSelected" />
</Listeners>
<SelectionModel>
<ext:DefaultSelectionModel runat="server" />
</SelectionModel>
</ext:TreePanel>
below are the javascript functions<script type="text/javascript">
function nodeLoad(node) {
Ext.net.DirectMethods.NodeLoad(node.id, {
success: function(result) {
var data = eval("(" + result + ")");
node.loadNodes(data);
},
failure: function(errorMsg) {
Ext.Msg.alert('Failure', errorMsg);
}
});
}
function nodeSelected(node) {
//alert(node.parentNode.id+':'+node.id);
Ext.net.DirectMethods.GetT2Metrics(node.parentNode.id, node.id);
}
</script>
I am using IE9, VS2008, Ext.Net 1.0please help me ..why beforeload event is not firing sometimes...
Last edited by Mr.Techno; Sep 21, 2011 at 12:05 PM.