Hi Formspider team,
Case: i have a grid with paging. I query the grid, so the datasource currentrow is the first record in the grid, so its on page 1. Now i go to page 2 or 3 or whatever using the paging buttons. The grid current row still is on page 1 (or whatever page it was when i started navigating through the grid pages). Now i create a new row in the grid (it places the new row after the datasource current row automtically). I dont see that happening, because the current row is on another page...
What i want to do is to set the grid page number to the page where the current row is on insert (with api_datasource.setPage), so that i can see the record that was inserted.
But, how can i get the page number of the current row in the grid?
Thanks, Michiel A.
According your description, I assume that the fetch mode of your datasource is "fethAll". If so, you can find the page number where the new row is inserted as follows;
if the rowsPerPage value of the datasource is not changing during runtime, you can define a global variable holding the rowsPerPage value of your datasource to avoid the
Hope this helps.
answered 28 Aug '12, 11:54
Ibrahim Sand... ♦♦
Yes, that will do the trick. The rowsPerPage will not change for the form, so i could make a form package constant to avoid the api call.
answered 28 Aug '12, 12:05