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

Style a header based on value of grouping

4 Answers 28 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
William
Top achievements
Rank 1
William asked on 06 Jan 2014, 06:14 PM
Is it possible to style a group header based on the value of the grouping?

Suppose I have some bank accounts that are grouped by a type, eg checking,savings, etc.

Is it possible to have the Checking header be displayed with one color, and the Savings header displayed with another?

Thank you

4 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 10 Jan 2014, 08:02 AM

Hello William,

Thanks for writing.



Yes, you can use a GroupHeaderTemplateSelector and return different DataTemplate instances for the different grouping values via it.



Regards,

Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
William
Top achievements
Rank 1
answered on 10 Jan 2014, 11:36 PM
Could you post or direct me to an example?

The specific area where I am running into problems is the SelectTemplate method on the selector. I don't know what type the incoming object is.

Thank you.
0
Deyan
Telerik team
answered on 13 Jan 2014, 09:18 AM

Hello William,

Thanks for writing back.



This object should be of type DataGroup. This type exposes the group key so you can decide which template to return.



Let me know if you have additional questions here.



Regards,

Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
William
Top achievements
Rank 1
answered on 14 Jan 2014, 02:25 PM
Thank you, that was exactly what I needed!
Tags
JumpList
Asked by
William
Top achievements
Rank 1
Answers by
Deyan
Telerik team
William
Top achievements
Rank 1
Share this question
or