-
8 Feb 2013 3:09 AM #1
I need Help
I need Help
I've a grid with pagination and order by data desc, when i insert a record in this grid with a window (it's not a editor grid panel), how set the grid on the page of the last insert record ??
This is possible ??
-
10 Feb 2013 11:22 PM #2
Hi,
May be you can provide more info about your need ,for better understanding the problem
as i understood your problem, try following code for insert record into grid ,after click on save button of your window:
Code:var record = new (yourGrid.store.recordType)(formvalues); yourGrid.store.insert(0, record);sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
11 Feb 2013 12:43 AM #3
Details
Details
I don't insert in the store, i insert directly in db ..........
-
11 Feb 2013 1:47 AM #4
Hi,
could you explain exactly what you want or provide your code ,sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
11 Feb 2013 7:12 AM #5
If I understand what is being requested, then you would need to do the following:
- You add a new record to the DB
- In your server success response, you will have to do some backend logic to check WHERE this has been inserted according to your sorting method - then return this. E.g. if it was a database of people, and you just added "Peter Parker", you would then return something like "success: true, recordnumber: 577".
- You then divide this returned number by your paging amount to know what page it would be listed on.
- Use the pagingbar's changePage() method to load the correct page of results where this record has just been added to


Reply With Quote