Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#6818 closed defect (fixed)

dojox.grid.DataGrid: deleting an item before scrolling down results in missing data

Reported by: Nathan Toone Owned by: Nathan Toone
Priority: high Milestone: 1.4
Component: DojoX Grid Version: 1.1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Setup:

1 - A DataGrid? with lots of data (more data than exists in the rowsPerPage) 2 - Delete an element from the top part of the data before scrolling 3 - Scroll to bottom

Where the page break happens (and the fetch for the next set of data occurs), there is a missing element. I don't know if this is a datastore issue or a grid issue. (I'm using ItemFileWriteStore? in my test)

Attachments (3)

DataGrid.patch (993 bytes) - added by Marcin Gołębski 10 years ago.
DataSource-2.patch (1.0 KB) - added by Marcin Gołębski 10 years ago.
better solution
DataGrid-3.patch (924 bytes) - added by Marcin Gołębski 10 years ago.
best solution :)

Download all attachments as: .zip

Change History (15)

comment:1 Changed 11 years ago by Nathan Toone

Reporter: changed from nathan to Nathan Toone

comment:2 Changed 11 years ago by Nathan Toone

Milestone: future
Owner: changed from Bryan Forbes to Nathan Toone

comment:3 Changed 11 years ago by Nathan Toone

Resolution: worksforme
Status: newclosed

I have not seen this recently, and as I was the one who opened it, I will now close it.

Changed 10 years ago by Marcin Gołębski

Attachment: DataGrid.patch added

comment:4 Changed 10 years ago by Marcin Gołębski

Resolution: worksforme
Status: closedreopened

When a row is deleted, all rest rows are shifted down, and migrate from page to page. If some page is not loaded yet empty rows can migrate to initialized pages without refreshing. It causes empty rows in some pages

comment:5 Changed 10 years ago by Nathan Toone

This patch is very close - but now, whenever you scroll to the next page, it takes MUCH longer to load the subsequent pages. For an example, look at the test_edit.html test case, delete the first row, and then scroll down to about row 25. Before applying the patch, the bug exists (row 25 is all "...") - after applying the patch, it works...but takes much longer to load rows 26-50 (and I get a UI hang in FF3.5 when it happens).

comment:6 in reply to:  5 Changed 10 years ago by Marcin Gołębski

Replying to toonetown:

Before applying the patch, the bug exists (row 25 is all "...") - after applying the patch, it works...but takes much longer to load rows 26-50 (and I get a UI hang in FF3.5 when it happens).

This can occure becouse the condision is to much general. The second patch will solve this problem.

Changed 10 years ago by Marcin Gołębski

Attachment: DataSource-2.patch added

better solution

comment:7 Changed 10 years ago by Nathan Toone

I'm still getting a much longer delay when rendering subsequent pages with the second patch as well...

comment:8 in reply to:  7 Changed 10 years ago by Marcin Gołębski

Replying to toonetown:

I'm still getting a much longer delay when rendering subsequent pages with the second patch as well...

OK, now I understand where the problem is. I changed approach, I thing for proper one. Insted of checking which row is missing, I suggest reset loaded-page info each time the row is deleted, becouse this info is no longer consistent. After DataSource?-3.patch application test_edit.html runs fine for me.

Changed 10 years ago by Marcin Gołębski

Attachment: DataGrid-3.patch added

best solution :)

comment:9 Changed 10 years ago by Nathan Toone

Thank you very much for these patches! I will take a look at this last one tomorrow morning.

comment:10 in reply to:  9 Changed 10 years ago by Marcin Gołębski

You are pretty fast :) Have a good night. Regards. Marcin

comment:11 Changed 10 years ago by Nathan Toone

Resolution: fixed
Status: reopenedclosed

(In [20314]) Fixes #6818 !strict - clear out our indexes when we delete an item. Thanks for the patch!

comment:12 Changed 10 years ago by bill

Milestone: future1.4
Note: See TracTickets for help on using tickets.