Author Topic: How to display newly added row at the bottom of the current displaying page.  (Read 2801 times)

suresh

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hi sir,
I am able add a row with a form submission at the end of the grid after a refresh of the grid. If the grid contains large set of rows, then after scrolling to the end of the grid only i can see the newly saved row.
But I need to add the newly added row at the end of currently showing grid page. is there any chance to do this? please help me


Thank you sir.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6314
    • View Profile
use array.splice method instead of push to add new row.

http://www.w3schools.com/jsref/jsref_splice.asp

you can get the index of last displayed row in viewport from finalPos parameter of beforeTableView event.

http://paramquery.com/api#event-beforeTableView

suresh

  • Newbie
  • *
  • Posts: 2
    • View Profile
Thank you for your valuable reply sir,

I have another problem,
When i use refresh or refreshDataandView - Ajax call is getting fired again while using remote option.

How to update the grid without the Ajax call again, after changing the the data .