PDA

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



tms2003@126.com
Mar 29, 2012, 1: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">

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



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!!!

Vladimir
Mar 29, 2012, 10:52 AM
Hi,

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
See
http://forums.ext.net/showthread.php?17771-Ext-NET-v2-0-Beta-Examples-Issues&p=77456&viewfull=1#post77456