Is there a way to have the column header template be optional? Depending upon some values in my data, I might need to use a header template for a specific column, otherwise, I would like the have the default behavior.
I tried placing an if statement inside the <GridColumn/> element like this:
<GridColumn Field= "" FieldType="" >
@if (_useHeaderTemplate)
{
<HeaderTemplate></HeaderTemplate>
}
</GridColumn>
This results in a compile error of "Unrecognized child content inside component ...."
I then tried
<GridColumn Field= "" FieldType="" >
<HeaderTemplate>
@if (_useHeaderTemplate)
{
<div>Custom Header</div>
}
</HeaderTemplate>
</GridColumn>
This results in no text being rendered for the column header.
I'm trying to avoid (a) duplicating the <GridColumn/> configuration for both the true and false evaluations of the if statement; (b) I don't want to take over the complete rendering and management of the grid column header. I still want the framework to handle that.
Thanks
-marc