Is there a way to dynamically set the display template for a grid cell at runtime? My datasource is dynamic, and I need to be able to have 3 different possible templates depending on the data in the row. The column itself is bound to an object, and contains the values that would be displayed. Here's what I want to display in a column:
({RelativePortion})% / {Portion}% -- for one type of record (Relative portion has a gray forecolor)
{Portion}% -- for another type of record
and display - when the portion value is 0 for either type of record
Editing the cell for either type should just be a textbox bound to {Portion}
I think RowLoaded is the event I want to accomplish this with, but I don't know where to start. I created a Page level resource for the DataTemplate for the first scenario but it didn't display anything, just the typename for the object bound to the column.
Any help would be greatly appreciated.
-Mike
({RelativePortion})% / {Portion}% -- for one type of record (Relative portion has a gray forecolor)
{Portion}% -- for another type of record
and display - when the portion value is 0 for either type of record
Editing the cell for either type should just be a textbox bound to {Portion}
I think RowLoaded is the event I want to accomplish this with, but I don't know where to start. I created a Page level resource for the DataTemplate for the first scenario but it didn't display anything, just the typename for the object bound to the column.
Any help would be greatly appreciated.
-Mike