fromat group header

Albert Shenker

I have a grid with the following GroupByexpressions. Instead of the group header showing "State: XX; Count: YYY" as it does now, I would like for it to simply show "State: XX (YYY)". Can anyone give me a hand in modifying the expressions to achieve this?

You can definitely have the RadGrid display the Group headers in the format you want, you just have to know which properties to set. First, in your <SelectFields> you need to set the HeaderText of the aggregate field to the string " " in order to keep it from displaying. This property's default value is the FieldName, which it will display if not set or if set with an empty string. Once you get rid of the HeaderText you also want to do the same with the HeaderValueSeparator by setting it to the string " " as well. This will keep the colon ":" from being displayed. In order to display the aggregate field's value in parenthesis, you can use the FormatString property, setting it to "({0})". Finally, in the RadGrid's <GroupSettings> properties, set the GroupByFieldsSeparator property to an empty string ("") in order to get rid of the semicolon. Having done all this you should see the header for each group display in the format you want.

Albert Shenker

Dhawal

i ran into a similar issue with a minor difference that i am binding the value in the group by column to an enumeration which displays appropriate value from the enum. the format string property does not have this bind method. hope u can help me on this below is the sample code:

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.