Feb 03, 2013, 11:21 PM
[CLOSED] Adding Summary breaks codebehind databinding
In the latest from trunc, adding a Summary to one GridPanel breaks codebehind databinding.
In the example below, when selection is changed in the west grid, it calls a method in the codebehind that binds data to the other grid. This works fine until the Sumary is added.
Errors:
Uncaught TypeError: Cannot read property 'childNodes' of null
Uncaught TypeError: Cannot call method 'removeChild' of null
In the example below, when selection is changed in the west grid, it calls a method in the codebehind that binds data to the other grid. This works fine until the Sumary is added.
Errors:
Uncaught TypeError: Cannot read property 'childNodes' of null
Uncaught TypeError: Cannot call method 'removeChild' of null
<ext:Viewport ID="Viewport1" runat="server" Layout="Border"> <Items>
<ext:GridPanel runat="server" ID="GPl_A" Title="" AutoScroll="True"
Region="West" Split="True" Width="750">
<Store>
<ext:Store ID="Se_A" runat="server">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Id" Type="Int" />
<ext:ModelField Name="A" Type="Float" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single">
<DirectEvents>
<SelectionChange OnEvent="GetData">
<EventMask ShowMask="true" />
</SelectionChange>
</DirectEvents>
</ext:RowSelectionModel>
</SelectionModel>
<ColumnModel>
<Columns>
<ext:RowNumbererColumn runat="server" Width="35" />
<ext:NumberColumn ID="NumberColumn16" runat="server" Text="Id" DataIndex="Id" Width="50"
Format="0" Align="Right" />
<ext:SummaryColumn ID="SummaryColumn1" runat="server" Width="59" Text="A" DataIndex="A"
SummaryType="Sum">
<Renderer Fn="Ext.util.Format.numberRenderer('0.00')" />
<SummaryRenderer Fn="Ext.util.Format.numberRenderer('0.00')" />
</ext:SummaryColumn>
</Columns>
</ColumnModel>
<Features>
<ext:Summary runat="server" />
</Features>
</ext:GridPanel>
<ext:GridPanel runat="server" ID="GridPanel1" Title="" AutoScroll="True"
Region="Center" Split="True">
<Store>
<ext:Store ID="Se_B" runat="server">
<Proxy>
<ext:PageProxy/>
</Proxy>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="B" Type="Float" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:NumberColumn ID="NumberColumn15" runat="server" Text="B" DataIndex="B"
Width="60" Format="0.00" Align="Right" />
</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Viewport>
Last edited by Daniil; Feb 04, 2013 at 11:00 AM.
Reason: [CLOSED]