View Full Version : Help for treepanel item direct click event!NullReferenceException!

Mar 29, 2012, 12:43 AM
I try to update my 1.3 code to 2.0,but when i try to use treepanel like this:

<ext:TreePanel ID="TreePanel1" runat="server" AutoScroll="true" TitleCollapse="true"
Width="500" HideParent="False" Region="West">

<ext:Node NodeID="aa" Text="roletree" />
<ItemClick OnEvent="NodeClick" />

public void NodeClick(object sender, DirectEventArgs e)
string tmpID = "";


when the click triggered,I got a error like this:

[NullReferenceException: 未将对象引用设置到对象的实例。]
Ext.Net.Observable.FireAsyncEvent(String eventName, ParameterCollection extraParams) +181
Ext.Net.ResourceManager.RaisePostBackEvent(String eventArgument) +1937
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

why ?how to modify?

need help!!!

Mar 29, 2012, 9:52 AM

Ext.Net 2 beta has a bug is related with DirectEvents, please wait next public release (should be soon)
Or you can fix it manually in the source code and rebuild assemblies