How to show Glyph icon in RadGridView cell
Environment
Product Version | Product | Author |
---|---|---|
2022.2.622 | RadGridView for WinForms | Dinko Krastev |
Description
This article demonstrates how to show Glyph icon in RadGridView cell depending on text in other column cells.
Solution
Populate the RadGridView control with sample data. For the purpose of this example, we will use DataTable with one column. The cells inside will contain a string that will use to set our glyph. The grid will have two columns, one will hold our icon and the other will point to the DataTable cell. To set our icon we can use the CellFormatting event of the control which will be called for each data cell. In order to use glyph, the CustomFont property of the cell needs to be set to our TelerikWebUI font name. Otherwise, the cell won't recognize the glyph string.