This is a migrated thread and some comments may be shown as answers.

[Solved] DataBinding issue in RadGrid

1 Answer 202 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bin
Top achievements
Rank 1
Bin asked on 19 Jun 2008, 12:14 AM
                <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!


1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 20 Jun 2008, 12:42 PM
Hello Bin,

Your aspx code seems fine. To be able to assist you with your problem, we will need a sample project demonstrating the mentioned issues. Please consider opening a regular support ticket, where you can attach a simplified working project. Once we can visualize the problem, we will be able to advise you further.

Looking forward to your reply.

Best wishes,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Bin
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or