thanks that strategy worked.
I want to add new blank rows on top of page when New Event button is clicked. So if it clicked 5 times, I want to add 5 blank rows.
I am doing Batch Save so user can add multiple items at a time
But I am getting error in pqgrid.min.js:350 Uncaught primary key violation.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//added to increment rowIndex
var addRowCounter = 0
{
type: 'button', icon: 'ui-icon-plus', label: 'New Event', listeners: [
{
"click": function (evt, ui) {
alert(addRowcounter);
$("#grid_paging").pqGrid("addRow",
{
rowList: [{ newRow: {}, rowIndx: addRowcounter, checkEditable: false }]
});
$("#grid_paging").pqGrid('addClass', { rowIndx: addRowcounter, cls: 'greenColor' });
addRowcounter = addRowcounter + 1;
}
}
]
}