9
« on: February 11, 2015, 02:21:59 am »
Hi,
I am following the pro demo for in line editing.
i have the below code for editrow
function editRow(rowIndx, $gridMain)
{
//debugger;
$gridMain.pqGrid("addClass", { rowIndx: rowIndx, cls: 'pq-row-edit' });
$gridMain.pqGrid("editFirstCellInRow", { rowIndx: rowIndx });
//change edit button to update button and delete to cancel.
var $tr = $gridMain.pqGrid("getRow", { rowIndx: rowIndx }),
$btn = $tr.find("button.edit_btn");
$btn.button("option", { label: "Update", "icons": { primary: "ui-icon-check" } })
.unbind("click")
.click(function (evt)
{
evt.preventDefault();
return update(rowIndx, $gridMain);
});
$btn.next().button("option", { label: "Cancel", "icons": { primary: "ui-icon-cancel" } })
.unbind("click")
.click(function (evt)
{
$gridMain.pqGrid("quitEditMode")
.pqGrid("removeClass", { rowIndx: rowIndx, cls: 'pq-row-edit' })
.pqGrid("rollback");
});
}
for some reason I can only Update button and not the cancel button in the row.
can you guide if i am missing something here.