Customizing Grouping even more

2 posts, 0 answers
  1. Todd Davis
    Todd Davis avatar
    36 posts
    Member since:
    Aug 2009

    Posted 15 Apr 2010 Link to this post

    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?
  2. Vlad
    Vlad avatar
    11100 posts

    Posted 16 Apr 2010 Link to this post


    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,
    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.
Back to Top