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

[Solved] Expose HeaderText value for Column group-by expressions

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PVR
Top achievements
Rank 1
PVR asked on 25 Jun 2009, 05:25 AM
When using the GroupByExpression property of a GridColumn is it possible to expose the HeaderText value for the associated GridGroupByField?

As per the manual the syntax for GroupByExpression is "fieldname[ alias]/aggregate(fieldname)[ alias][, ...] Group By fieldname[ sort][, ...]", but setting the associated HeaderText of the GroupByField displayed on the GroupPanel is not exposed.
The only way I could change this was by handling the GroupsChanging Event, finding the corresponding GroupByField and setting the HeaderText value there.

Perhaps adding a property eg GroupByPanelHeaderText or changing syntax of GroupByExpression to be "fieldname[ alias]/aggregate(fieldname)[ alias][, ...] Group By fieldname[ sort][, ...] as HeaderText".

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 30 Jun 2009, 01:44 PM
Hi Pablo Venegas,

There is an easier way to expose the header text for the group-by field - just add another SelectField in the mark-up for the group-by expressions and set its header text as per your requirements. The HeaderText property of the group-by field is not set but is sill publicly exposed since the same code class is used both for the GroupByField and the SelectFields - however, this property can be set only for the SelectFields.

I hope this information helps.

All the best,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
PVR
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or