Grouping RadGrid By Databound Label Value

2 posts, 0 answers
  1. Alex
    Alex avatar
    16 posts
    Member since:
    Nov 2012

    Posted 23 Jul 2013 Link to this post

    I have a RadGrid with a template column. Here is the column's markup:

    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumnMaterial column"                          HeaderText="Material" UniqueName="TemplateColumnMaterial">
         <asp:Label ID="LabelMaterialSubstring" runat="server" Text='<%#Eval("material").ToString().Substring(7, 3) %>'></asp:Label>

    Can I group by the value bound in the label's text property? If so, how?
  2. Andrey
    Andrey avatar
    836 posts

    Posted 26 Jul 2013 Link to this post


    Thank you for contacting us.

    All advanced functionality of RadGrid like paging, grouping, filtering, sorting is performed over the datasource not on the display value. That is to say in order to use the grouping functionality you need to provide DataField property of GridTemplateColumn with a value and based on that field the grouping functionality will group the data.

    I am afraid that the Grid is not capable of grouping by controls or by partial value of the data field.

    Please excuse us if this behavior is inconvenient for you.

    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 the blog feed now.
Back to Top