≺ back to sample list
viewers icon
In this sample we show how to provide custom viewers to display data.
What is shown in this sample:

Shows how to use default viewers, and how to provide custom viewers to display a flag along the country’s name and bold text in group headers. The code makes use of the viewerDefinitions, groupDefinitions and columnDefinitions properties.

The Country column is using a custom viewer, which is a ViewerProvider to display an image and a text. The Country group header uses the same ViewerProvider as the one defined for the data cells. The City group header uses a custom group viewer defining a function returning a bold text. The Discontinued column is using the default image viewer to show an image of a checkmark when the value is true. To show the string representation, the "default" viewer can be used.