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

Grouping RadGrid By Databound Label Value

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 2
Alex asked on 23 Jul 2013, 03:09 PM
I have a RadGrid with a template column. Here is the column's markup:

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


Can I group by the value bound in the label's text property? If so, how?

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 26 Jul 2013, 08:12 AM
Hello,

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.

Regards,
Andrey
Telerik
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.
Tags
Grid
Asked by
Alex
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Share this question
or