PDA

View Full Version : [CLOSED] Infinite scrolling grid wrong row updating after edit record in modal form window



ASAPCH
Oct 23, 2012, 2:01 PM
Hello,I have following problem with updating grid row after editing in detail form window.
I have similar ext:gridpanel as described at thread:
http://forums.ext.net/showthread.php?21473-Infinite-buffered-scrolling-grid-How-to-move-paging-scroller-to-new-position-from-code-programatically
After user doubleclicks on some row in grid, modal form edit window is opened. After editing by user clicking Save button,
proper row in table in SQL DB is updated and also grid row is updated with new data. It is done by following handler in code behind:
....

protected void SavePerson(object sender, DirectEventArgs e)
{
int id = int.Parse(e.ExtraParams["id"]);
GetFormValues(id); // SQL update table Person
var record = this.GridStore.GetById(id);
this.windowPersonDetail.Hide(); // closing detail edit form window
formpanelPerson.UpdateRecord(record); // updating proper row in grid
record.Commit();
}
But after scrolling grid (infinite buffered scrolling type) by up/down or next/prev page keys or by mouse , original data(data before
editing),are shown back in previously edited row in grid.In database are proper data.Please can somebody tell me,what I have done wrong or where the problem is? Many thanks for help.
Regards. Asapch

Daniil
Oct 23, 2012, 7:44 PM
Hi @ASAPCH,

Please try to set up the Store's PageSize to the count of records that you bind to the Store.

As here:
http://examples2.ext.net/#/GridPanel/Infinite_Scrolling/Buffered_Scrolling/

5000 records are bound to the Store and PageSize is 5000 as well.

ASAPCH
Oct 23, 2012, 10:43 PM
Hi @ASAPCH,

Please try to set up the Store's PageSize to the count of records that you bind to the Store.

As here:
http://examples2.ext.net/#/GridPanel/Infinite_Scrolling/Buffered_Scrolling/

5000 records are bound to the Store and PageSize is 5000 as well.

Hi Daniil, thank you for your reply.My table has 8647 records and so I set Pagesize=8647. Updating row in gridpanel after edit seems working fine now, but I'm afraid that this setting may affect the page loading speed respectively the large memory requirements on the server side or client side because of loading large amounts of data.What is your opinion?

Daniil
Oct 24, 2012, 1:10 PM
Well, it should not affect much on the performance. Probably, you should not notice any significant change. Though it will take more memory.

If the performance is a key point, we would suggest to consider a possibility to organize remote buffering.
http://examples2.ext.net/#/GridPanel/Infinite_Scrolling/Overview/

By the way, if there is a possibility to have much more records, then remote buffering is a single solution.

ASAPCH
Oct 25, 2012, 2:02 PM
Well, it should not affect much on the performance. Probably, you should not notice any significant change. Though it will take more memory.

If the performance is a key point, we would suggest to consider a possibility to organize remote buffering.
http://examples2.ext.net/#/GridPanel/Infinite_Scrolling/Overview/

By the way, if there is a possibility to have much more records, then remote buffering is a single solution.

Hello Daniil,
you're right, performance is not visible affected. Later eventually I'll do a test on a real server. I think,that this thread could be closed.Thanks!