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

InPlace EditMode does not change the behavior..

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zeo
Top achievements
Rank 1
Zeo asked on 11 Jun 2012, 11:09 PM
Dear all,

The InPlace edit mode brings me to an empty grid with the text "No records to display.". (Both the double click as the GridEditCommandColumn button.
See below my aspx code on the RadGrid, what am I missing?

Any advice would be welcome.

Thanks in advance,
Zeo

<telerik:RadGrid ID="RadGrid1" runat="server"
     DataSourceID="SqlDataSource1" CellSpacing="0" GridLines="None"
            onneeddatasource="RadGrid1_NeedDataSource" >
 
<MasterTableView HierarchyDefaultExpanded="True"
            DataSourceID="SqlDataSource1" ShowGroupFooter="True" AutoGenerateColumns="False" EditMode="InPlace">
 
    <Columns>
        <telerik:GridBoundColumn DataField="Week" DataType="System.Int32"
            HeaderText="Week" ReadOnly="True" SortExpression="Week"
            UniqueName="Week">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Client"
            HeaderText="Client"
            SortExpression="Client" UniqueName="Client" ReadOnly="True">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Planning" DataType="System.Double"
            HeaderText="Geplande uren"
            SortExpression="Planning" UniqueName="Planning" ReadOnly="True">
        </telerik:GridBoundColumn>
        <telerik:GridNumericColumn DecimalDigits="2"
            FilterControlAltText="Filter Uren column" DataField="Planning" DataType="System.Double" UniqueName="Uren" HeaderText="Gewerkte Uren">
        </telerik:GridNumericColumn>
        <telerik:GridDropDownColumn
            UniqueName="RedenAfw" HeaderText="Afwezig">
        </telerik:GridDropDownColumn>
        <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Wijzigen"
             UniqueName="Bijwerken" EditImageUrl="Images/Edit.png">
            <HeaderStyle Width="45px" />
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton"
            HeaderText="Bevestig"
            ImageUrl="Images/rooster-aanwezig.png" UniqueName="Bevestig">
            <HeaderStyle Width="45px" />
        </telerik:GridButtonColumn>
    </Columns>
 
    <GroupByExpressions>
        <telerik:GridGroupByExpression>
            <GroupByFields>
                <telerik:GridGroupByField FieldAlias="Week" FieldName="Week" FormatString=""
                    HeaderText="Week" />
            </GroupByFields>
        </telerik:GridGroupByExpression>
    </GroupByExpressions>
 
</MasterTableView>
</telerik:RadGrid>


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Jun 2012, 04:48 AM
Hi Zeo,

Try setting the SelectFields collection in the GroupByExpressions. You have only set the GroupByFields collection in the GridGroupByExpression.After inspecting your code, i saw you populating the RadGrid with both NeedDataSource and SqlDataSource, I suggest you to use any one of the data binding method.

ASPX:
<GroupByExpressions>
    <telerik:GridGroupByExpression>
        <GroupByFields>
            <telerik:GridGroupByField FieldAlias="Week" FieldName="Week" FormatString=""
                HeaderText="Week" />
        </GroupByFields>
        <SelectFields>
        <telerik:GridGroupByField FieldName="Client" />
        </SelectFields>
    </telerik:GridGroupByExpression>
</GroupByExpressions>

Please take a look into this help documentation.

Hope this helps.
Thanks,
Shinu.
Tags
Grid
Asked by
Zeo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or