Telerik GridGroupByExpression 只显示一个条目
Telerik GridGroupByExpression show only one entry
使用 Telerik RadGrid,我选择对结果进行分组。
在添加我的组之前,所有数据都显示正确。
之后,它只显示第一个条目,并告诉我在接下来的页面上有 X 个结果(不可能转到这些页面)
我想知道哪里出了问题,或者我错过了什么。
为了对我的结果进行分组,我使用了这个代码。
<GroupByExpressions>
<rad:GridGroupByExpression>
<SelectFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</SelectFields>
<GroupByFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</GroupByFields>
</rad:GridGroupByExpression>
如果我删除它,所有结果都会正确显示,但当然不会分组
这是我的视图代码。
<rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
AllowPaging="true" AllowCustomPaging="true" PageSize="50" AllowSorting="true" AllowFilteringByColumn="True"
EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">
<GroupingSettings CaseSensitive="false" />
<MasterTableView DataKeyNames="EndUserCompany" GroupLoadMode="Client" Width="100%">
<GroupByExpressions>
<rad:GridGroupByExpression>
<SelectFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</SelectFields>
<GroupByFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</GroupByFields>
</rad:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<rad:GridBoundColumn HeaderText="NumLicense" DataField="NumLicense"
FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
<rad:GridBoundColumn HeaderText="StatusLicense" DataField="StatusLicense"
FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
<rad:GridBoundColumn HeaderText="NameProduct" DataField="NameProduct"
FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
<rad:GridTemplateColumn HeaderText="ActiveMaintenance" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-HorizontalAlign="Center" AllowFiltering="False">
<ItemTemplate>
<dnn:DnnImage Runat="server" ID="activeMaintenance" IconKey="Checked" Visible="False" />
<dnn:DnnImage Runat="server" ID="noActiveMaintenance" IconKey="Unchecked" Visible="False" />
</ItemTemplate>
</rad:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
<Selecting AllowRowSelect="True" />
<Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
</ClientSettings>
问题来自 AllowCustomPaging
禁用它解决我的问题
<rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
AllowPaging="true" AllowCustomPaging="false" PageSize="50" AllowSorting="false" AllowFilteringByColumn="true"
EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">
使用 Telerik RadGrid,我选择对结果进行分组。
在添加我的组之前,所有数据都显示正确。 之后,它只显示第一个条目,并告诉我在接下来的页面上有 X 个结果(不可能转到这些页面)
我想知道哪里出了问题,或者我错过了什么。
为了对我的结果进行分组,我使用了这个代码。
<GroupByExpressions>
<rad:GridGroupByExpression>
<SelectFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</SelectFields>
<GroupByFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</GroupByFields>
</rad:GridGroupByExpression>
如果我删除它,所有结果都会正确显示,但当然不会分组
这是我的视图代码。
<rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
AllowPaging="true" AllowCustomPaging="true" PageSize="50" AllowSorting="true" AllowFilteringByColumn="True"
EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">
<GroupingSettings CaseSensitive="false" />
<MasterTableView DataKeyNames="EndUserCompany" GroupLoadMode="Client" Width="100%">
<GroupByExpressions>
<rad:GridGroupByExpression>
<SelectFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</SelectFields>
<GroupByFields>
<rad:GridGroupByField FieldName="EndUserCompany" />
</GroupByFields>
</rad:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<rad:GridBoundColumn HeaderText="NumLicense" DataField="NumLicense"
FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
<rad:GridBoundColumn HeaderText="StatusLicense" DataField="StatusLicense"
FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
<rad:GridBoundColumn HeaderText="NameProduct" DataField="NameProduct"
FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
<rad:GridTemplateColumn HeaderText="ActiveMaintenance" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-HorizontalAlign="Center" AllowFiltering="False">
<ItemTemplate>
<dnn:DnnImage Runat="server" ID="activeMaintenance" IconKey="Checked" Visible="False" />
<dnn:DnnImage Runat="server" ID="noActiveMaintenance" IconKey="Unchecked" Visible="False" />
</ItemTemplate>
</rad:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
<Selecting AllowRowSelect="True" />
<Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False" />
</ClientSettings>
问题来自 AllowCustomPaging
禁用它解决我的问题
<rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
AllowPaging="true" AllowCustomPaging="false" PageSize="50" AllowSorting="false" AllowFilteringByColumn="true"
EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">