Hi,
I like to render a column in the MVC grid with a dynamically rendered field with a color hex. This is in a subgrid wich is generated like below:
.ClientDetailTemplateId("templateSubTasks")
I know that when using a hashtag in a template grid you have to proceed it with two \ I also know that when using a hashtag for example a color hex, you have to proceed it with 4 \. But what when the color hex is loaded with a value from the data property like #= data.TaskLabel?data.TaskLabel.Color:'' #
Her you can see the column I create in the parent grid. This has to be adjusted for use in a subgrid as a template.
columns.Bound(c => c.TaskLabel).Title(Order.clmLabel).ClientTemplate("<div style='border-radius: 3px; display:inline; width: 8px; height: 18px; background-color: #= data.TaskLabel?data.TaskLabel.Color:'' #'> </div><span style='margin-left:10px'> #= data.TaskLabel?data.TaskLabel.Name:'' #</span>").Width(100).Encoded(false).EditorTemplateName("GridDropdownEditorLabel");
I didn't succeed with adding \\\\ to the property data.TaskLabel.Color.
Do you have any idea?
Kind regards,
Roel Alblas