Author Topic: How to insert one row Middle of the table  (Read 2947 times)

杨万里

  • Newbie
  • *
  • Posts: 25
    • View Profile
How to insert one row Middle of the table
« on: June 03, 2018, 07:40:52 pm »
Hi! :( :( :(
How to insert one row Middle of the table?
I try to use addRow to do this.
rowIndx=1
$grid.pqGrid("addRow", {rowData: rowData,rowIndx:rowIndx});
but the original  first row change.
how to insert one row like sql "insert into table where id=1";

Think you !
 

杨万里

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: How to insert one row Middle of the table
« Reply #1 on: June 06, 2018, 04:24:20 pm »
I need help,thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to insert one row Middle of the table
« Reply #2 on: June 07, 2018, 12:05:51 pm »
Please use addRow to append or insert a new row and updateRow to update existing row.

https://paramquery.com/api#method-addRow

https://paramquery.com/api#method-updateRow

Please share a jsfiddle if you are facing any issue.

杨万里

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: How to insert one row Middle of the table
« Reply #3 on: June 10, 2018, 02:50:09 pm »
Thank you for help me!
But if existing row is very many;This takes a lot of execution time.
Is there only one way?
thank you!