I'm trying to use the code in the row editing demo but the buttons don't seem to do anything when I click on them. I noticed that the code references a pencil-icon. My buttons don't display the pencil-icon like the demo does.
{title: "", editable: false, minWidth: 165, sortable: false,
render: function (ui) {
return "<button type='button' class='edit_btn'>Edit</button>\
<button type='button' class='delete_btn'>Delete</button>";
},
postRender: function (ui) {
var rowIndx = ui.rowIndx,
grid = this,
$cell = grid.getCell(ui);
//delete button
$cell.find(".delete_btn").button({icons: {primary: 'ui-icon-close'}})
.bind("click", function (evt) {
deleteRow(rowIndx, grid);
});
//edit button
$cell.find(".edit_btn").button({icons: {primary: 'ui-icon-pencil'}})
.bind("click", function (evt) {
if (isEditing(grid)) {
return false;
}
editRow(rowIndx, grid, true);
});
//if it has edit class, then edit the row.
if (grid.hasClass({rowData: ui.rowData, cls: 'pq-row-edit'})) {
editRow(rowIndx, grid);
}
}
}