PDA

View Full Version : [CLOSED] Grouped Buffered GridPanel won't Collapse



stratadev
Jan 21, 2013, 8:35 PM
It appears that a GridPanel that is using the buffer plugin and grouping feature won't collapse. After digging deeper it looks like the onGroupClick method is called twice when the group header is clicked and the group is already expanded. This results in a quick collapse expand resulting in no visual change. After calling collapse manually the default expand seems to work fine (only one call to onGroupClick).

For the time being I'm getting this to work by overriding onGroupClick:


Ext.override(Ext.grid.feature.Grouping, {

onGroupClick: function (view, group, idx, foo, e) {
}
});


...and using GroupClick listener like this:



groupClick: function (view, node, group) {
if (item.features[0].isExpanded(group) == true) {
item.features[0].collapse(group);
}
else {
item.features[0].expand(group);
}
}


This to me feels like a bug any suggestions?
Also it seems like StartCollapsed="true" does not do anything at the moment...

Thanks,
Ryan




<ext:GridPanel ID="GridPanel1" runat="server" Title="Buffered Grid of 5,000 random records"
Width="700" Height="500">
<Plugins>
<ext:BufferedRenderer LeadingBufferZone="100" TrailingBufferZone="100">
</ext:BufferedRenderer>
</Plugins>
<Store>
<ext:Store ID="Store1" runat="server" PageSize="100" GroupField="category">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="id" />
<ext:ModelField Name="name" />
<ext:ModelField Name="category" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Features>
<ext:Grouping ID="Grouping1" runat="server" GroupHeaderTplString='{name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})'
StartCollapsed="true">
</ext:Grouping>
</Features>
<ColumnModel ID="ColumnModel2" runat="server">
<Columns>
<ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Width="40" Sortable="false" />
<ext:Column ID="Column1" runat="server" Text="Name" Flex="1" DataIndex="name" />
</Columns>
</ColumnModel>
<%-- <Listeners>
<GroupClick Fn="OverheadAllocationConfiguration.groupClick" Buffer="50" />
</Listeners>--%>
<BottomBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:NumberField ID="NumberField1" runat="server" FieldLabel="Jump to row" MinValue="1"
MaxValue="5000" AllowDecimals="false" ItemID="gotoLine" />
</Items>
</ext:Toolbar>
</BottomBar>
</ext:GridPanel>

Baidaly
Jan 21, 2013, 11:28 PM
Hello!

Thank you for the report!

We are investigating.

Daniil
Jan 22, 2013, 6:43 AM
Hello everybody,

I can't reproduce the problem with the latest sources from SVN.

I think it has been fixed yesterday.

Re: StartCollapsed

Thank you for the report.

We already have an Issue for this bug.
https://github.com/extnet/Ext.NET/issues/26

stratadev
Jan 22, 2013, 8:03 PM
Great, I'll keep a lookout for the next release.

Thanks,
Ryan

Daniil
Jan 23, 2013, 4:46 AM
Please note that you can get the latest sources here:
http://svn.ext.net/premium/trunk/