Author Topic: New line when first opening, new line just after recording  (Read 3207 times)

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 147
    • View Profile
New line when first opening, new line just after recording
« 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"}

 

Code: [Select]
    function addRow() {
        var rowData = {}; //empty row template
        $grid.pqGrid("addRow", { rowIndxPage: 0, rowData: rowData });
     }
« Last Edit: November 24, 2013, 04:58:51 pm by omerix »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: New line when first opening, new line just after recording
« Reply #1 on: November 25, 2013, 01:30:34 pm »
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.


« Last Edit: November 25, 2013, 03:30:45 pm by paramquery »