How to Display Byte Array Image in RadGridView Column
Environment
Product Version | 2019.1.220 |
Product | RadGridView for WPF |
Description
How to display an image from a byte array in RadGridView when auto generated columns are enabled.
Solution
-
Implement an IValueConverter that converts the byte array to an ImageSource object.
-
Define a DataTemplate in XAML that contains an Image element bound to the byte array. And use the converter to convert the array to an ImageSource.
-
Subscribe to the AutoGeneratingColumn event of RadGridView and in the event handler check if the column is the one showing the byte array. In this case, set the column's CellTemplate property.