This question is locked. New answers and comments are not allowed.
I've been googling for an hour. Can't find the answer to this seemingly straightforward question.
How do you display a model's boolean column as a readonly checkbox instaed of the default text (true or false)?
My model contains a boolean property called IsInternal.
Here's my code snippet.
This does not work. It results in a column of unchecked editable checkboxes that are not bound to my model.
Can someone please help.
Regards
Phil
How do you display a model's boolean column as a readonly checkbox instaed of the default text (true or false)?
My model contains a boolean property called IsInternal.
Here's my code snippet.
.Columns(columns =>
{
columns.Bound(o => o.IsInternal)
.ClientTemplate("<input type='checkbox' name='IsInternal' value='<#= IsInternal #>' readonly /> ");
This does not work. It results in a column of unchecked editable checkboxes that are not bound to my model.
Can someone please help.
Regards
Phil