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

column dont belong to table?

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bhuvan
Top achievements
Rank 1
Bhuvan asked on 15 Feb 2011, 02:34 PM
Hi

I Read Many forums but i didnt got the solution for this?

I will have my aspx code here
<Code>
  <telerik:RadGrid runat="server" ID="radgvInbox"  AutoGenerateColumns="false"  
GridLines="None"  Width="100%" BorderWidth="0px" AllowSorting="True" 
ShowGroupPanel="True"  style="margin-right: 0px" AllowPaging="true" Height="300px" 
            onprerender="radgvInbox_PreRender1">
             
                     <ClientSettings Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true" Selecting-AllowRowSelect="true"
EnablePostBackOnRowClick="true" AllowDragToGroup="true" EnableRowHoverStyle="true" 
                      AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                    <Selecting AllowRowSelect="True" />                                   
                    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
                    ResizeGridOnColumnResize="False"></Resizing>
                    </ClientSettings>
                                             
                    <MasterTableView TableLayout="Fixed" GroupLoadMode="Client" DataKeyNames="MessageID"
AdditionalDataFieldNames="Date" UseAllDataFields="true" RetrieveAllDataFields="true">                                         
                     <GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="Received" HeaderValueSeparator=":" SortOrder="Descending" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="Received" HeaderText="Date" FormatString="{0:d}" />
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>


       <Columns>
                            <telerik:GridBoundColumn DataField="From" HeaderText="From">
       </telerik:GridBoundColumn>
                          <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject">
       </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Received" HeaderText="Received">
       </telerik:GridBoundColumn>
                        </Columns>

                    </MasterTableView>                        
                </telerik:RadGrid>
</Code>

In cs page

 radgvInbox.DataSource = dr;
        radgvInbox.DataBind();


thats what i am doing why i am getting that error..i think i missed a small thing ..will anyone help regarding this issue please

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Feb 2011, 06:27 AM
Hello Bhuvan,

I guess you are getting this error because the column you are trying to add in GroupByEdpression does not exist in the datatable. Can you check that?

Thanks,
Princy.
Tags
Grid
Asked by
Bhuvan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or