ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: omerix on November 24, 2013, 04:34:16 pm
-
Hello,
1) Can you run "addRow function" each time when page loaded?
2) Can you run addRow just after enter new data to addRow.
3) It is not very important but I just want to know if it is possible to addRow on the lower side of PqGrid?
4) Can I set ID to Pqgrid return from server just after making record from add Row? {"uindx":"10","ID":"984"}
function addRow() {
var rowData = {}; //empty row template
$grid.pqGrid("addRow", { rowIndxPage: 0, rowData: rowData });
}
-
1) Yes, Listen to load event.
2) That depends upon how you define "add new data to new row" whether you want to add another row just after entering data in one cell or wait until all the row has valid data.
Listen to cellSave event, check rowData to check for the add new row criteria and finally call addRow.
3) Yes it's possible by passing rowIndxPage = (rPP (results per page) - 2) to addRow. No need to pass rowIndx or rowIndxPage while at the last page.
4) Get row data template from server before call to addRow.