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

Customizing Grouping even more

1 Answer 17 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Todd Davis
Top achievements
Rank 1
Todd Davis asked on 15 Apr 2010, 09:09 PM
I'll try to describe this as best I can...

Image that I am writing an app for a car company.
They have a List<Car>. Some cars are assigned to Dealerships. If so, Car has a DealershipID that is not null.

Ok, so we want a grid of Cars, grouped by DealerShipID. So far, no problem. I can use GroupDescriptors to do that, and an Aggregate function to tell me how many cars are in each Dealership.

But the DealershipID is the only data that Car has.

My Employer would like me to display some more info about the Dealership in the Grouping, such as the Dealership name, location, phone, etc.

Cars: 10  Bobs Honda - West Chester - 123-321-1234
    Red Honda
    Blue Honda
    .....

1) Can this be done? How do I custom text to the grouping?
2) Is there a way to {Bind} to the Dealership object in XAML to do this, or will I need custom code behind to manage it?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Apr 2010, 06:49 AM
Hello,

You can use GroupHeaderTemplate similar to our demo to modify the group header. To achieve your goal you can use both bindings and code.

All the best,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Todd Davis
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or