Hi All,
I've got a collection of Question objects, and each question object has child Answer Object, each answer object could be a different class.
Is it possible to display a different user control in the cell for each row in a grid. What i'm trying to do is have a grid with the first column showing the QuestionText and the second column showing the answer, but the second column needs to display the information differently depending on the AnswerObject type.
Is this possible using xam datagrid?
Thanks
Hello,
Theoretically, you could use a DataTrigger as a part of the CellValuePresenterStyle or EditorStyle to set the Template (and/or EditTemplate for the Editor) to your UserControl depending on a property of your underlying Object's value for that Field. You can see this documentation for more information on styling the XamDataGrid. For more information on DataTriggers, please see this documentation.