Author Topic: Batch Editing - Remote multi page - New Row  (Read 2781 times)

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Batch Editing - Remote multi page - New Row
« on: February 23, 2019, 02:25:40 am »
Hello,

I'm using "Batch editing".
https://paramquery.com/pro/demos/editing_batch

I'm using "Remote Paging".

I'm entering multi-line data by copying from "Excel".

For This;  The new line with the ".AddRow" function. It has to be at the bottom.

At the end of page 3 or at the end of page 1 it is not a problem for me to have a new line.

Note: If the records are single pages, no problem.

I tried these;

Go to the last page without opening new row in "addRow" function.
Code: [Select]
grid.goToPage({page:3});
var rowIndx = grid.addRow( { rowIndxPage: 40,rowData: rowData, checkEditable: true });
grid.goToPage({ rowIndx: rowIndx});
grid.editFirstCellInRow({ rowIndx: rowIndx });



I tried to show all the records on 1 page without opening a new row.
Result successful

Code: [Select]
grid.option('pageModel.rPP',999999)
            //grid.refreshDataAndView();
var rowIndx = grid.addRow({rowData: rowData, checkEditable: true });
grid.goToPage({ rowIndx: rowIndx});
grid.editFirstCellInRow({ rowIndx: rowIndx });


But I want to ask if I can do it in any other way.
Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Batch Editing - Remote multi page - New Row
« Reply #1 on: February 25, 2019, 11:48:24 am »
Please follow this example for batch editing with remote paging.

https://paramquery.com/pro/demos/editing

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
Re: Batch Editing - Remote multi page - New Row
« Reply #2 on: February 28, 2019, 10:11:25 pm »
Hello,

This way, I cannot copy + paste from excel.

I started using the code below.  I do "dataRefresh" after saving.

There's no problem right now. I hope there's no mistake.

Code: [Select]
var pm=grid.option( "pageModel" );
grid.option( "pageModel", { type: 'local',curPage: 1,rPP:pm.rPP,rPPOptions:pm.rPPOptions} );

var rowIndx = grid.addRow( { rowData: rowData, checkEditable: true });
grid.goToPage({ rowIndx: rowIndx });
grid.editFirstCellInRow({ rowIndx: rowIndx })



Please follow this example for batch editing with remote paging.

https://paramquery.com/pro/demos/editing