PDA

View Full Version : [CLOSED] group summary does not support paging?



tobros
Oct 08, 2013, 3:21 AM
if the rows in one group exceed the page size, the the group will be cut two group, the summary will display in page bottom, and another summary will display next page.
70097010

Daniil
Oct 08, 2013, 5:23 AM
Hi @tobros,

A GroupingSummary can't count the records from the current page only.

What about paging per group?
http://svn.ext.net/premium/trunk/Ext.Net.Examples/Examples/GridPanel/Plugins/GroupPaging/

tobros
Oct 08, 2013, 6:18 AM
Hi @tobros,

A GroupingSummary can't count the records from the current page only.

What about paging per group?
http://svn.ext.net/premium/trunk/Ext.Net.Examples/Examples/GridPanel/Plugins/GroupPaging/
when add group paging plugin, the pagesize =1 and limit=1 though i set pagesize=20.


<ext:Store runat="server" ID="s_store" OnReadData="on_read_data_xjllsjtz" PageSize="20" GroupField="DdateVouchClassCodeNo">



<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:PagingToolbar runat="server" StoreID="s_store">
<Plugins>
<ext:GroupPaging />
</Plugins>
</ext:PagingToolbar>
</Items>
</ext:Toolbar>
</BottomBar>


ext.net version 2.2.0.28491

Daniil
Oct 08, 2013, 6:31 AM
GroupPaging is to organize paging by groups. It doesn't take PageSize into account. One page - one group.

tobros
Oct 08, 2013, 6:39 AM
GroupPaging is to organize paging by groups. It doesn't take PageSize into account. One page - one group.

may be there is something wrong , it is not one page , one group




<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cashflow_data_adjust1.aspx.cs" Inherits="TobrosCWT.pages.cashflow.cashflow_data_adjust1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="../../Script/GridPanelMergeCells.js"></script>
<script type="text/javascript">
var itemclick = function (record, item, index, e, eOpts) {
Ext.getCmp('drStartAccCode').originalText = Ext.String.trim(item.raw.Ccode);
Ext.getCmp('drStartAccCode').setValue(item.raw.Cod eName);
Ext.getCmp('drStartAccCode').collapse();


};

</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" SourceFormatting="True"></ext:ResourceManager>
<ext:Window runat="server" Title="现金流量_分配凭证过滤条件" ID="w_search_window" Hidden="True" Layout="HBoxLayout" Width="240">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>

<ext:Container ID="Container1" runat="server" Layout="AnchorLayout" Margins="4">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="60" Mode="Raw" />
</Defaults>
<Items>
<ext:ComboBox ID="cb_pzfw" runat="server" FieldLabel="凭证范围" Editable="False">
<Items>
<ext:ListItem Text="全部" Value="-1" />
<ext:ListItem Text="记账凭证" Value="1" />
<ext:ListItem Text="未记账凭证" Value="0" />
</Items>
<SelectedItems>
<ext:ListItem Text="全部" Value="-1" />
</SelectedItems>
</ext:ComboBox>
<ext:ComboBox ID="cb_vouch_class" runat="server" Editable="False" FieldLabel="凭证类别" DisplayField="VouchClassName" ValueField="VouchClassCode">
<Store>
<ext:Store runat="server" ID="store_VCC">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="VouchClassCode">
<Fields>
<ext:ModelField runat="server" Name="VouchClassCode"></ext:ModelField>
<ext:ModelField runat="server" Name="VouchClassName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>

</ext:Store>
</Store>
<SelectedItems>
<ext:ListItem Index="0" />
</SelectedItems>

</ext:ComboBox>
<ext:ComboBox ID="cb_kjqj" FieldLabel="会计期间" Editable="False" runat="server">
</ext:ComboBox>

<ext:FieldContainer ID="FieldContainer1" runat="server" FieldLabel="凭证号">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>
<ext:NumberField ID="pz_from" runat="server" Width="65" />
<ext:Label ID="Label2" runat="server" Text="-" />
<ext:NumberField ID="pz_to" runat="server" Width="65" />
</Items>
</ext:FieldContainer>

<ext:FieldContainer ID="fc_kmbm"
runat="server"
FieldLabel="科目编码(包含)"
AnchorHorizontal="100%"
LabelWidth="60"
Layout="HBoxLayout">
<Items>
<ext:DropDownField ID="drStartAccCode" runat="server" TriggerIcon="Search" Frame="true"
ForceFit="true">
<Listeners>
<Expand Handler="return this.picker.setWidth(250);" />
</Listeners>
<Component>
<ext:TreePanel
ID="TreePanel1"
runat="server"
Title="科目编码"
Icon="Accept"
Height="250"
Width="250"
UseArrows="true"
AutoScroll="true"
Animate="true"
HideHeaders="true"
RootVisible="false">
<Store>
<ext:TreeStore ID="TreeStore1" runat="Server" NodeParam="Ccode" AutoLoad="false">
<Model>
<ext:Model ID="Model5" runat="server" IDProperty="Ccode">
<Fields>
<ext:ModelField Name="Ccode"></ext:ModelField>

<ext:ModelField Name="CodeName"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:AjaxProxy runat="Server" Json="true" Url="../../BasicInfoAshx/AllSubjectHandler.ashx">
<Reader>
<ext:JsonReader runat="Server" Root="data">
</ext:JsonReader>
</Reader>

</ext:AjaxProxy>
</Proxy>

</ext:TreeStore>
</Store>
<Root>
<ext:Node runat="Server" Expanded="true" Leaf="false">
</ext:Node>
</Root>
<ColumnModel>
<Columns>
<ext:TreeColumn ID="TreeColumn1" runat="server" Flex="1" DataIndex="CodeName" Text="科目">
</ext:TreeColumn>
</Columns>
</ColumnModel>
<Listeners>
<ItemClick Fn="itemclick"></ItemClick>
</Listeners>
</ext:TreePanel>
</Component>
</ext:DropDownField>


</Items>
</ext:FieldContainer>
</Items>
</ext:Container>

</Items>
<Buttons>
<ext:Button ID="Button1" runat="server" Text="确认">
<DirectEvents>
<Click OnEvent="btn_submit">
<EventMask ShowMask="True"></EventMask>
<ExtraParams>
<ext:Parameter Name="p_acc_code" Value="#{drStartAccCode}.originalText" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="取消"></ext:Button>
</Buttons>
</ext:Window>
<ext:GridPanel runat="server" Title="现金流量数据调整" ColumnLines="True" ID="gp1">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button ID="Button3" runat="server" Text="查询" Icon="BookOpen">
<Listeners>
<Click Handler="#{w_search_window}.show();"></Click>
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Store>
<ext:Store runat="server" ID="s_store" OnReadData="on_read_data_xjllsjtz" GroupField="DdateVouchClassCodeNo">
<Listeners>
</Listeners>
<Model>
<ext:Model runat="server" IDProperty="rn">
<Fields>
<ext:ModelField Name="rn"></ext:ModelField>
<ext:ModelField Name="VouchId"></ext:ModelField>
<ext:ModelField Name="Ddate" Type="Date"></ext:ModelField>
<ext:ModelField Name="VouchClassCode"></ext:ModelField>
<ext:ModelField Name="VouchNo"></ext:ModelField>
<ext:ModelField Name="VouchClassCodeNo"></ext:ModelField>
<ext:ModelField Name="Digest"></ext:ModelField>
<ext:ModelField Name="Ccode"></ext:ModelField>
<ext:ModelField Name="Cname"></ext:ModelField>
<ext:ModelField Name="Jfje"></ext:ModelField>
<ext:ModelField Name="Dfje"></ext:ModelField>
<ext:ModelField Name="Bill"></ext:ModelField>
<ext:ModelField Name="Checker"></ext:ModelField>
<ext:ModelField Name="Book"></ext:ModelField>
<ext:ModelField Name="VouchSource"></ext:ModelField>
<ext:ModelField Name="DdateVouchClassCodeNo"></ext:ModelField>

</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:PageProxy>
</ext:PageProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="sp_pzfw" Value="#{cb_pzfw}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="sp_vouch_class_code" Value="#{cb_vouch_class}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="sp_kjqj" Value="#{cb_kjqj}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="pz_from" Value="#{pz_from}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="pz_to" Value="#{pz_to}.getValue()" Mode="Raw" />
<ext:StoreParameter Name="drStartAccCode" Value="#{drStartAccCode}.getValue()" Mode="Raw" />
</Parameters>
</ext:Store>
</Store>
<ColumnModel>
<Columns>

<ext:Column runat="server" DataIndex="Digest" Text="摘要" Flex="1"></ext:Column>
<ext:Column runat="server" DataIndex="Ccode" Text="科目编码"></ext:Column>
<ext:Column runat="server" DataIndex="Cname" Text="科目名称" Flex="1"></ext:Column>
<ext:SummaryColumn runat="server" DataIndex="Jfje" Text="借方金额" SummaryType="Sum">
</ext:SummaryColumn>
<ext:SummaryColumn runat="server" DataIndex="Dfje" Text="贷方金额" SummaryType="Sum"></ext:SummaryColumn>
<ext:Column runat="server" DataIndex="Bill" Text="制单"></ext:Column>
<ext:Column runat="server" DataIndex="Checker" Text="审核"></ext:Column>
<ext:Column runat="server" DataIndex="Book" Text="记账">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
<ext:Column runat="server" DataIndex="VouchSource" Text="凭证来源">
<Editor>
<ext:TextField runat="server"></ext:TextField>
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:PagingToolbar runat="server" StoreID="s_store">
<Plugins>
<ext:GroupPaging />
</Plugins>
</ext:PagingToolbar>
</Items>
</ext:Toolbar>
</BottomBar>
<Features>
<ext:GroupingSummary
ID="GroupingSummary1"
runat="server"
GroupHeaderTplString="{name}"
HideGroupedHeader="False"
EnableGroupingMenu="false" />
</Features>
<SelectionModel>
<ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" Mode="Single"></ext:CheckboxSelectionModel>
</SelectionModel>
<DirectEvents>
<ItemClick OnEvent="EditEventHandler">
<EventMask ShowMask="True"></EventMask>
<ExtraParams>
<ext:Parameter Name="VouchId" Value="record.data.VouchId" Mode="Raw" />
<ext:Parameter Name="Ddate" Value="record.data.Ddate" Mode="Raw" />
<ext:Parameter Name="VouchClassCode" Value="record.data.VouchClassCode" Mode="Raw" />
<ext:Parameter Name="VouchNo" Value="record.data.VouchNo" Mode="Raw" />
<ext:Parameter Name="sum" Value="App.GroupingSummary1.refreshData.summaryData" Mode="Raw" />
</ExtraParams>

</ItemClick>
</DirectEvents>
</ext:GridPanel>
<ext:Window runat="server" Title="现金流量项目" ID="w_xjllxm" Hidden="True" Layout="HBoxLayout" Padding="4" Width="265">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>
<ext:FormPanel runat="server" Margin="4" ID="fp1">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="88" Mode="Raw" />
<ext:Parameter Name="Margin" Value="4" Mode="Raw" />
<ext:Parameter Name="InputWidth" Value="135" Mode="Raw" />
</Defaults>
<Items>
<ext:TextField ID="tf_xjllxm" runat="server" FieldLabel="现金流量项目"></ext:TextField>
<ext:NumberField ID="nf_fpje" runat="server" FieldLabel="分配金额"></ext:NumberField>
<ext:NumberField ID="nf_pzjehj" runat="server" FieldLabel="凭证金额合计" ReadOnly="True"></ext:NumberField>
<ext:NumberField ID="nf_fpjehj" runat="server" FieldLabel="分配金额合计" ReadOnly="True"></ext:NumberField>
</Items>
<Buttons>
<ext:Button runat="server" Text="确定"></ext:Button>
<ext:Button runat="server" Text="取消"></ext:Button>
</Buttons>
</ext:FormPanel>
</Items>
</ext:Window>
</form>
</body>
</html>

Daniil
Oct 08, 2013, 10:42 AM
GroupPaging doesn't support remote paging.

With remote paging you can manage it on server side. Just return from the on_read_data_xjllsjtz handler all the records for the only group.

tobros
Oct 10, 2013, 6:21 AM
GroupPaging doesn't support remote paging.

With remote paging you can manage it on server side. Just return from the on_read_data_xjllsjtz handler all the records for the only group.

can paging according the grouped header row? such as devexpress
http://demos.devexpress.com/ASPxGridViewDemos/Summary/GroupSortBySummary.aspx

they can paging with grouped rows and detail rows

Baidaly
Oct 11, 2013, 12:29 AM
Hello!

You can try to use RowExpander with a Grid inside it: http://examples2.ext.net/#/GridPanel/RowExpander/MultiLevel_GridPanel/