Hi,
I have:
columns.Bound(t => t.IsActive).Width(45)
.ClientTemplate("#=dirtyField(data,'IsActive')# <input type='checkbox' #=IsActive ? checked='checked':'' # ;/>")
.HtmlAttributes(new { style = "text-align:center; " });
with the following javascript which, I believe I got from Telerik
function dirtyField(data, fieldName)
{
var hasClass = $("[data-uid=" + data.uid + "]").find(".k-dirty-cell").length <
1
;
if (data.dirty && data.dirtyFields[fieldName] && hasClass)
return "<span
class
=
'k-dirty'
></
span
>";
else
return "";
}
It works great if I click on the cell first and then check/uncheck the checkbox.
However, if I click directly on the checkbox it doesn't flag it as dirty and the changes are not saved.
Can someone point me in the right direction?
Thanks … Ed