Grouping with OData? Will it work?

4 posts, 0 answers
  1. Carling
    Carling avatar
    15 posts
    Member since:
    May 2011

    Posted 06 Apr 2012 Link to this post

    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:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="RadGridTicketDetails">
                    <telerik:AjaxUpdatedControl ControlID="RadGridTicketDetails"/>
    <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"
        <PagerStyle CssClass="RadGridPager" Mode="NumericPages"></PagerStyle>
        <HeaderStyle CssClass="RadGridHeader"></HeaderStyle>
        <FooterStyle CssClass="FooterStyle"></FooterStyle>
               <telerik:GridBoundColumn DataField="ProductID" HeaderText="ProductID" DataType="System.Int32">
                 <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" DataType="System.String">
                  <telerik:GridBoundColumn DataField="UnitPrice" HeaderText="UnitPrice" DataType="System.Decimal" DataFormatString="{0:C}">
                 <telerik:GridBoundColumn DataField="ReorderLevel" HeaderText="ReorderLevel" DataType="System.Int32">
                  <telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued" DataType="System.Boolean">
        <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false" AllowDragToGroup="True" AllowGroupExpandCollapse="True" AllowColumnsReorder="true">
            <DataBinding Location="" ResponseType="JSONP">
                <DataService TableName="Products" Type="OData"/>
            <Selecting AllowRowSelect="True"/>
        <GroupingSettings ShowUnGroupButton="true"/>
  2. Carling
    Carling avatar
    15 posts
    Member since:
    May 2011

    Posted 09 Apr 2012 Link to this post

    Has no one attempted this?
  3. Radoslav
    Radoslav avatar
    1564 posts

    Posted 11 Apr 2012 Link to this post

    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: (Client side data-binding limitations section).

    Kind regards,
    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.
  4. Carling
    Carling avatar
    15 posts
    Member since:
    May 2011

    Posted 11 Apr 2012 Link to this post

    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.
Back to Top