Hello I need to put widget in each cell of grid on data load.
In my opinion best method is “bindingcomplete”
but this event rise _BEFORE_ DOM element in cells are changed.
$("#grid").bind("bindingcomplete", function (event) {
// Ok we will be here
$('.my-cell-class').each(function () {
// But not here , $('.my-cell-class') is empty
});
});
$("#grid").jqxGrid(
{
...
columns: [
{ text: 'Status', datafield: 'status', cellclassname: 'my-cell-class'}
]
}
Of course exist ugly workaround:
$("#grid").bind("bindingcomplete", function (event) {
setTimeout(function () {
$('.my-cell-class').each(function () {
});
},1000);
});
But maybe exists more civilized method?