Checkbox in Column rendering as Encoded Html instead of displaying actual Checkbox

Mar 22, 2013 at 4:21 PM
Edited Mar 22, 2013 at 6:19 PM
Hi,

First of all, thank you for such an excellent grid.

I am struggling to get a Checkbox within a Grid Column,
columns.Add(col5 => col5.IsChecked)
                    .Titled("Is Check") 
                    .RenderValueAs(col5 => Html.CheckBox("SomeCheckbox",col5.IsChecked).ToHtmlString());
I get result as

__<td class="grid-cell" style="" data-name="IsChecked"><input checked="checked" id="SomeCheckbox" name="SomeCheckbox" type="checkbox" value="true" /><input name="SomeCheckbox" type="hidden" value="false" /></td>__

Any ideas what I am missing or doing incorrectly ?

Thank you,

KRK
Mar 22, 2013 at 6:18 PM
Edited Mar 22, 2013 at 6:19 PM
Figured it out.

I had missed the Sanitized and Encoded method.

.Encoded(false)
.Sanitized(false)


Thank you.