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

Grouping only displays one row.

4 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 19 May 2014, 03:52 PM
I set ShowGroupPanel="True" and AllowDragToGroup="True" and GroupsDefaultExpanded="true". When I debug, I only see one record and I don't see all possible groups. You can see a sample of before and after below. What am I missing?

Tom

After grouping by Dept:
 Before grouping:







4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 May 2014, 05:23 AM
Hi Tom,

I'm not clear about your issue, please provide your full code snippet. I cannot find any sample attached, please attach again. This is not an expected behavior, take a look at this demo, to know about the working functionality of Grid - Grouping.

Thanks,
Shinu
0
Tom
Top achievements
Rank 1
answered on 20 May 2014, 01:30 PM
0
Tom
Top achievements
Rank 1
answered on 20 May 2014, 01:33 PM
This is the Dept code:

<telerik:GridTemplateColumn DataField="Dept" HeaderText="Dept" SortExpression="Dept" UniqueName="Dept" FilterControlAltText="Filter Dept column"
FilterControlWidth="120" ItemStyle-Width="150" HeaderStyle-Width="150" FooterStyle-Width="150" Groupable="true" GroupByExpression="Dept Group By Dept">
<ItemTemplate>
<asp:Label ID="DeptLabel1" runat="server" Text='<%# Eval("Dept") %>' ></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox ID="RadComboBoxDept" runat="server" AutoPostBack="true"
DataTextField="Dept" DataValueField="Dept" OnSelectedIndexChanged="RadComboBoxes_SelectedIndexChanged"
EmptyMessage="Dept" OnDataBinding="RadComboBoxes_DataBinding" OnDataBound="RadComboBoxes_DataBound">
</telerik:RadComboBox>
</EditItemTemplate>
<FooterStyle Width="150px"></FooterStyle>
<HeaderStyle Width="150px"></HeaderStyle>
<ItemStyle Width="150px"></ItemStyle>
</telerik:GridTemplateColumn>
0
Shinu
Top achievements
Rank 2
answered on 21 May 2014, 05:24 AM
Hi Tom,

From your screenshot I can see that, on grouping, one item is displayed and the next item is available in the next page. I cant see any pager in your Grid, so how do you navigate to next page? Make sure you have not set any PageSize on grouping so that it hides the rows. Please take a look at the sample code and screenshot. if this doesn't help, provide your full code snippet.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" DataSourceID="SqlDataSource1" Skin="WebBlue" AllowPaging="true" AutoGenerateEditColumn="true" AllowSorting="true" ShowGroupPanel="true" >
    <MasterTableView CommandItemDisplay="Top">
        <Columns>
            <telerik:GridBoundColumn UniqueName="OrderID" DataField="OrderID" HeaderText="OrderID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShipCity" HeaderText="ShipCity" UniqueName="ShipCity">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="CustomerID" DataField="CustomerID" HeaderText="CustomerID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShipVia" HeaderText="ShipVia" UniqueName="ShipVia">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName" UniqueName="ShipName" GroupByExpression="ShipName Group By ShipName">
                <ItemTemplate>
                    <asp:Label ID="DeptLabel1" runat="server" Text='<%# Eval("ShipName") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
 </telerik:RadGrid>

Thanks,
Shinu
Tags
Grid
Asked by
Tom
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Tom
Top achievements
Rank 1
Share this question
or