{{if ${IsPublished} === true}} You won't see me {{else}} Shouldn't see me. {{/if}} | {{if ${IsPublished} === true}} Correct {{else}} Can be correct {{/if}} |
")
.Columns(column =>
{
column.For(m => m.IsPublished).DataType("boolean").Width("85").HeaderText(" ");
column.For(m => m.PublishedText).DataType("string").Width("85").HeaderText(" ");
})
.Features(feature =>
{
feature.Updating()
.EnableAddRow(false)
.EnableDeleteRow(false)
.EditMode(GridEditMode.Cell)
.ColumnSettings(setting =>
{
setting.ColumnSetting().ColumnKey("IsPublished").ReadOnly(true);
setting.ColumnSetting().ColumnKey("PublishedText").ReadOnly(true);
});
feature.Hiding()
.ColumnSettings(setting =>
{
setting.ColumnSetting().ColumnKey("IsPublished").Hidden(true).AllowHiding(false);
setting.ColumnSetting().ColumnKey("PublishedText").Hidden(false).AllowHiding(false);
});
})
.DataSource(Model.Items)
.DataBind()
.Render()
)