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 ??
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 ??
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.
I don't insert in the store, i insert directly in db ..........
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.
If I understand what is being requested, then you would need to do the following:
http://docs.sencha.com/ext-js/3-4/#!...hod-changePage
- 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