| <Telerik:RadGrid ID="grid1" runat="server" ShowGroupPanel="True" ShowFooter="True" | |
| Visible="False" AllowSorting="True" AllowPaging="True" GridLines="None" OnNeedDataSource="grid1_NeedDataSource"> | |
| <ClientSettings> | |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> | |
| </ClientSettings> | |
| <MasterTableView AutoGenerateColumns="False" GroupLoadMode="Client" ShowGroupFooter="True" > | |
| <Columns> | |
| <Telerik:GridBoundColumn DataField="State" HeaderText="State" UniqueName="State" | |
| Visible="true"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="Store" HeaderText="Store" UniqueName="Store" | |
| Visible="true"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="FeeType" HeaderText="Fee Type" | |
| UniqueName="FeeType"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="TotalSale " HeaderText="Total Sale" | |
| UniqueName="TotalSale"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="FeeRate" Aggregate="Count" HeaderText="Fee Rate" UniqueName="FeeRate"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="FeeAmount" FooterText="Total Amount of Fee:" | |
| HeaderText="Fee Amount" UniqueName="FeeAmount"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="TaxRate" HeaderText="Tax Rate" UniqueName="TaxRate"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="TaxAmount" FooterText="Total Amount of Tax:" | |
| HeaderText="Tax Amount" UniqueName="TaxAmount"> | |
| </Telerik:GridBoundColumn> | |
| <Telerik:GridBoundColumn DataField="TotalAmount" FooterText="Total Amount of Cost:" | |
| HeaderText="Total Amount" UniqueName="TotalAmount"> | |
| </Telerik:GridBoundColumn> | |
| </Columns> | |
| <GroupByExpressions> | |
| <Telerik:GridGroupByExpression> | |
| <SelectFields> | |
| <Telerik:GridGroupByField FieldName="State" HeaderText="State" FieldAlias="State" FormatString="" /> | |
| </SelectFields> | |
| <GroupByFields> | |
| <Telerik:GridGroupByField FieldName="State" FieldAlias="State" FormatString="" HeaderText="" /> | |
| </GroupByFields> | |
| </Telerik:GridGroupByExpression> | |
| <Telerik:GridGroupByExpression> | |
| <SelectFields> | |
| <Telerik:GridGroupByField FieldName="Store" HeaderText="Store" FieldAlias="Store" FormatString="" /> | |
| </SelectFields> | |
| <GroupByFields> | |
| <Telerik:GridGroupByField FieldName="Store" FieldAlias="Store" FormatString="" HeaderText="" /> | |
| </GroupByFields> | |
| </Telerik:GridGroupByExpression> | |
| </GroupByExpressions> | |
| <RowIndicatorColumn Visible="False"> | |
| <HeaderStyle Width="20px" /> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn Resizable="False" Visible="False"> | |
| <HeaderStyle Width="20px" /> | |
| </ExpandCollapseColumn> | |
| <EditFormSettings> | |
| <PopUpSettings ScrollBars="None" /> | |
| </EditFormSettings> | |
| </MasterTableView> | |
| </Telerik:RadGrid></td> | |
above is my code to build the grid
I've got a databinding problem when I was using grouping and calculating function in radgrid.
The thing is if I add aggregate="xxx" option(any option in aggregate) to the GridBoundColumn, when I run the grid ,it give me the error"Column 'xxx' does not belong to table ." If I don't add the aggregate option, everything is ok .
Another thing is I can add aggreate="count" into the column which show the string value, it works, but for the column which show the float/int value, it returns the error"Column 'xxx' does not belong to table ."
Can anyone tell me what happened to my code? Thank you!