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

Grouping with OData? Will it work?

3 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carling
Top achievements
Rank 2
Carling asked on 06 Apr 2012, 09:59 PM
I've been trying all day to get grouping to work in my Grid with OData.  Are there any known issues? Shouldn't it work?

Here's some sample code that I know is not working:

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server"></telerik:RadAjaxManagerProxy>
<telerik:RadScriptManager runat="server" ID="RadScriptManager1">
    </telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGridTicketDetails">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGridTicketDetails"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGridTicketDetails" runat="server" ActiveItemStyle-BackColor="Green" HeaderStyle-BackColor="#00597A" EnableEmbeddedSkins="true" Skin="Metro"
                 ShowGroupPanel="True" GroupingEnabled="true">
    <MasterTableView TableLayout="Fixed" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" GroupsDefaultExpanded="true" PageSize="10" GroupLoadMode="Client"
    AutoGenerateColumns="false">
    <PagerStyle CssClass="RadGridPager" Mode="NumericPages"></PagerStyle>
    <HeaderStyle CssClass="RadGridHeader"></HeaderStyle>
    <FooterStyle CssClass="FooterStyle"></FooterStyle>
    <Columns>
           <telerik:GridBoundColumn DataField="ProductID" HeaderText="ProductID" DataType="System.Int32">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" DataType="System.String">
            </telerik:GridBoundColumn>
              <telerik:GridBoundColumn DataField="UnitPrice" HeaderText="UnitPrice" DataType="System.Decimal" DataFormatString="{0:C}">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="ReorderLevel" HeaderText="ReorderLevel" DataType="System.Int32">
              </telerik:GridBoundColumn>
              <telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued" DataType="System.Boolean">
              </telerik:GridCheckBoxColumn>
         </Columns>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false" AllowDragToGroup="True" AllowGroupExpandCollapse="True" AllowColumnsReorder="true">
        <DataBinding Location="http://services.odata.org/Northwind/Northwind.svc" ResponseType="JSONP">
            <DataService TableName="Products" Type="OData"/>
        </DataBinding>
        <Selecting AllowRowSelect="True"/>
    </ClientSettings>
    <GroupingSettings ShowUnGroupButton="true"/>
</telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Carling
Top achievements
Rank 2
answered on 09 Apr 2012, 01:34 PM
Has no one attempted this?
0
Radoslav
Telerik team
answered on 11 Apr 2012, 08:41 AM
Hello Carling,

Unfortunately the RadGrid does not support grouping when it is bound on the client side. In order to have grouping enabled into the RadGrid you need to use server side data binding. Additionally on the following link you could find more information about client side data-binding limitations:
http://www.telerik.com/help/aspnet-ajax/grid-client-side-binding-specifics.html (Client side data-binding limitations section).

Kind regards,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Carling
Top achievements
Rank 2
answered on 11 Apr 2012, 01:51 PM
Thanks!  I had resorted to adding the groupings programmatically which was seeming to be working, but we'll just go to server-side binding.  That's sad, because the odata stuff is really cool.
Tags
Grid
Asked by
Carling
Top achievements
Rank 2
Answers by
Carling
Top achievements
Rank 2
Radoslav
Telerik team
Share this question
or