Hi,
In the sample attached, the boolean value in the grid is rendered as checkbox, but none of following editor event is triggered.
valuedChanged
keydown
keypress
keyup
click
I'd like to capture checkbox event, espeically valueChanged event, in our application to do some business logic validation. editCellStarting, editCellEnding do not fit our application require, because once checkbox is set focus, the value can be changed, and editCelllEnding event only fired once when checkbox lost focus.
Any comment/suggestion is appreciated,
Michael
Hi Michael,
Checkbox is not part of the editors, so it doesn't have the events you stated.
One way I can think of which will help you to get the value of the checkbox is to handle the igGrid cellClick event. In there get the editor for the column with igGridUpdating.editorForKey method. You can get the value of the checkbox editor provider (which is not igEditor instance) using editor.data("igEditorFilter").options.provider.value.
Here is an example code:
$("#grid1").on("iggridcellclick", function(evt, ui) { var editor = $("#grid1").igGridUpdating("editorForKey", "Selected"); if (editor != null && editor.data("igEditorFilter")) var value = editor.data("igEditorFilter").options.provider.value; });
$("#grid1").on("iggridcellclick", function(evt, ui) {
var editor = $("#grid1").igGridUpdating("editorForKey", "Selected");
if (editor != null && editor.data("igEditorFilter"))
var value = editor.data("igEditorFilter").options.provider.value;
});
Another approach is to extend $.ig.EditorProviderCheckbox, but that's another talk (I hope that the solution which I describe in this post will work for you).
Hope this helps,
Martin Pavlov
Infragistics, Inc.
Hi Martin,
Thanks for your solution, but I do like to hear your suggestion on extend EditorProviderCheckbox which fits our implementation better.
Thanks,
I am also interested in extending this editor. Any thoughts?