This question is locked. New answers and comments are not allowed.
I have a editable grid in which I have a boolean column. A validation needs to be performed so that the grid contains only one row with the boolean column set to true. I am using MVCs remote validation and it does not seem to work.
Here is my column,
columns.Bound(c => c.IsDefault).Title("Is Default").ClientTemplate("<input type='checkbox' disabled='disabled' name='CheckedIsDefault' <#= IsDefault? 'checked' : '' #> />").Width(50);And here the remote validation attribute in my Model
[DisplayName("Is Default")] [Remote("AllowDefaultSelection", "Validation", AdditionalFields = "KeywordListId, id",HttpMethod = "POST")] public bool IsDefault { get; set; } Previously my column was a nullable boolean so the grid was rendered as a drop-down list with 3 options (not selected, true and false) the validation seems to work fine when it was a drop down list.
Thanks in advance for your help.