Hi All,
I am not sure if I am pushing the limits of RadGrid here, but below is the code that I am using.
I am trying to do is group the data in the RadGrid by Entity and then by Location, this I have achieved. I would also like to have a sub total per location and then a total per entity.
As I said I get the grouping right, I also get the total by location right, but what seems to be is happening is that total per Entity seems to be the last amount in the location.
Firstly, can I achieve what I am trying to and secondly how.
Thanx
| <telerik:RadGrid ID="RadGridMonthlyReport" runat="server" AllowFilteringByColumn="True" | |
| AllowSorting="True" DataSourceID="objDsMonthlyBillingReportAll" | |
| GridLines="None" Skin="Vista" HorizontalAlign="Left"> | |
| <HeaderContextMenu> | |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> | |
| </HeaderContextMenu> | |
| <ExportSettings OpenInNewWindow="True" ExportOnlyData="True" /> | |
| <MasterTableView ShowGroupFooter="true" AutoGenerateColumns="False" DataSourceID=""> | |
| <RowIndicatorColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </ExpandCollapseColumn> | |
| <Columns> | |
| <telerik:GridBoundColumn DataField="EntityNumber" HeaderText="Entity" SortExpression="EntityNumber" UniqueName="EntityNumber" /> | |
| <telerik:GridBoundColumn DataField="LocationName" HeaderText="Department" SortExpression="LocationName" UniqueName="LocationName" /> | |
| <telerik:GridBoundColumn DataField="ItemName" HeaderText="Item" SortExpression="ItemName" UniqueName="ItemName" /> | |
| <telerik:GridBoundColumn DataField="Total" DataType="System.Decimal" HeaderText="Total" ReadOnly="True" SortExpression="Total" UniqueName="Total" Aggregate="Sum" FooterText="Total: " /> | |
| </Columns> | |
| <GroupByExpressions> | |
| <telerik:GridGroupByExpression> | |
| <GroupByFields> | |
| <telerik:GridGroupByField FieldName="EntityNumber" /> | |
| </GroupByFields> | |
| <SelectFields> | |
| <telerik:GridGroupByField FieldName="EntityNumber" HeaderText="Entity Number" /> | |
| </SelectFields> | |
| </telerik:GridGroupByExpression> | |
| <telerik:GridGroupByExpression> | |
| <GroupByFields> | |
| <telerik:GridGroupByField FieldName="LocationName" /> | |
| </GroupByFields> | |
| <SelectFields> | |
| <telerik:GridGroupByField FieldName="LocationName" HeaderText="Location Name" /> | |
| </SelectFields> | |
| </telerik:GridGroupByExpression> | |
| </GroupByExpressions> | |
| </MasterTableView> | |
| <FilterMenu> | |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> | |
| </FilterMenu> | |
| </telerik:RadGrid> |