i'm trying a grid with jquery.bootgrid, but i can't generate command buttons...
- At first, i get data with a webmethod... no problem.
- Then i use the "append" method, fine.
- But, when apply "formatters" don“t works
.
$.ajax({
url: url,
type: 'POST',
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ 'idPO': 1}),
success: function (result) {
if (result.d != null) {
$("#grid-data").bootgrid({
caseSensitive: false,
selection: true,
formatters: {
"commands": function () {
return "<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + id + "\"><span class=\"fa fa-pencil\"></span></button> ";
}
}
}).bootgrid("append", result.d);
}
})