how make cell 'dirty' setting value programmatically?
New DiscussionHi, I have checkbox template for string field and don’t know how to make cell ‘dirty’ so the editor dialog “Done” Cancel” could see it.
When user click check box cell changes text value fine (valid/invalid) but editor doesn’t see it.
I tried this:
var temp = “<input type=’checkbox’ {{if ${ValidOrInvalid} == ‘Valid’}} checked=’checked’ {{/if}} onclick=’changeState(this, ${Id})’>${ValidOrInvalid}”;
var DefaultColumns = [
{ headerText: “Valid Or Invalid”, key: “ValidOrInvalid”, dataType: “string”, width: “10%”, template: temp },
and:
function changeState(element, rowId) {
var $checkBox = $(element);
if ($checkBox.prop("checked")) {
$("#grid").igGridUpdating("setCellValue", rowId, "ValidOrInvalid", "Valid");
} else {
$("#grid").igGridUpdating("setCellValue", rowId, "ValidOrInvalid", "Invalid");
}
setTimeout(function () { $("#grid").igGridUpdating("startEdit", rowId, 1); }, 2);
}
But no luck, thanks
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
3 Created On
Mar 25, 2020 Last Post
5 years, 11 months ago