Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
Group header text when grouping on field that have an image
posted

This is a xamDataGrid with a TemplateField column named "Status" in which we have an image depending on status of a thing. 

When we drag the header "Status" into the group area, the regroupment is ok but the header of the group "+" is by default the full path of the image. 

Is it possible to simply put our own text in this group header depending on status rather than the default full path of the image ? Or do you have any other suggestion ?

Thanks. 

  • 34430
    Offline posted

    Hello Stephane,

    I have been investigating into the behavior you are looking to achieve, and in order to do this, I would recommend first handling the Grouped event of the XamDataGrid. The event handler for the Grouped event can net you the FieldLayout that the group belongs to as well as a collection of FieldSortDescription elements that represent the grouping.

    When you group the grid, the Records collection of the grid is then populated with GroupByRecord elements. Each of these GroupByRecords has a Description property that you can set that acts as the caption for the group by records in the UI of your grid and as such, I would recommend setting this Description property in the Grouped event.

    Please let me know if you have any other questions or concerns on this matter.