Aug 14, 2013, 2:16 PM
[CLOSED] TreeStore issue with 2.2
Hi, I upgraded my code to 2.2 from 2.1 and now I get an exception with my tree store configuration. I can't see what the issue is?
My simplified code snippet is:
My simplified code snippet is:
<ext:TreePanel ID="TreePanelUnits" runat="server" Layout="Fit" RootVisible="False"
UseArrows="True" Region="Center" Animate="True" AnimCollapse="False">
<Store>
<ext:TreeStore runat="server" ClearOnLoad="False">
<Proxy>
<ext:AjaxProxy Url='<%# Url.Action("GetChildren") %>' AutoDataBind="True" Json="True" />
</Proxy>
<Root>
<ext:Node Text="Categories" NodeID="*:*" />
</Root>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="id" Type="String" />
<ext:ModelField Name="text" Type="String" />
<ext:ModelField Name="ShortName" Type="String" />
<ext:ModelField Name="Type" Type="String" />
<ext:ModelField Name="PickRouting" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:TreeStore>
</Store>
<ColumnModel>
<Columns>
<ext:TreeColumn Flex="2" runat="server" Text="Name" DataIndex="text">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:TreeColumn>
<ext:Column runat="server" DataIndex="Type" Text="Type" Flex="1">
<Editor>
<ext:SelectBox runat="server">
<Items>
<ext:ListItem Text="Bay" Value="Bay" />
<ext:ListItem Text="Shelf" Value="Shelf" />
<ext:ListItem Text="Unit" Value="Unit" />
</Items>
</ext:SelectBox>
</Editor>
</ext:Column>
<ext:Column runat="server" DataIndex="ShortName" Text="Short Name" Flex="2">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" DataIndex="PickRouting" Text="Routing" Flex="1" Hidden="True">
<Editor>
<ext:NumberField runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
</ext:TreePanel>
Results in this exception:
Nullable object must have a value.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Nullable object must have a value.
Source Error:
Line 28: base.OnPreRender(e);Line 29: Line 30: if (this.EnableLocking || this.ColumnModel.Columns.Any(c => (c.Locked.HasValue || c.Locked.Value) || (c.Lockable.HasValue || c.Lockable.Value)))Line 31: {Line 32: this.ColumnModel.IDMode = Ext.Net.IDMode.Ignore;
Source File: E:\@projects\ExtJS\Ext.Net\trunk\Ext.Net\Ext\Tree\TreePanelBase.cs Line: 30
Stack Trace:
[InvalidOperationException: Nullable object must have a value.] System.Nullable`1.get_Value() +13988019 Ext.Net.TreePanelBase.<OnPreRender>b__0(ColumnBase c) in E:\@projects\ExtJS\Ext.Net\trunk\Ext.Net\Ext\Tree\TreePanelBase.cs:30 System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +149 Ext.Net.TreePanelBase.OnPreRender(EventArgs e) in E:\@projects\ExtJS\Ext.Net\trunk\Ext.Net\Ext\Tree\TreePanelBase.cs:30 System.Web.UI.Control.PreRenderRecursiveInternal() +113 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Control.PreRenderRecursiveInternal() +222 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044
This code was working fine before, did something change?
Last edited by geoffrey.mcgill; Feb 07, 2015 at 12:39 AM.