This is a migrated thread and some comments may be shown as answers.

How to set a single GridViewDataColumn to display multiple data types?

1 Answer 121 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adnan
Top achievements
Rank 1
Adnan asked on 22 Jan 2017, 12:09 PM
I am working on a RadGridView component where I have a single column that should display data using two control types, a TextBlock and an Image interchangeably. How can I achieve this? Can you please provide an example?!

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 24 Jan 2017, 04:35 PM
Hello Adnan,

If I understood your requirements correctly you can use the columns' CellTemplateSelector property and provide a DataTemplateSelector with your custom logic in its SelectTemplate method.

Please let me know if this is indeed what you're looking for. If that is not the case, please provide more details about the result you want to achieve and I will gladly assist you further.

Regards,
Dilyan Traykov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Adnan
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or