Opened 13 years ago

Closed 12 years ago

#9218 closed defect (invalid)

Regression: DataGrid attempts to look up negative row numbers

Reported by: Phil DeJarnett Owned by: Bryan Forbes
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.3.0
Keywords: DataGrid, QueryReadStore, negative, rowIndex, row Cc:
Blocked By: Blocking:


Previously, when I wanted to clear a selection, I could "select" the row -1. This would clear the selection.

Since 1.3, however, DataGrid? is now attempting to look up negative row numbers. I am using DataGrid? in conjunction with QueryReadStore?, and my server is now seeing queries that look like:

    start: -15,
    count: 15

DataGrid? should return back to the way it was, when getItem(-1) returned null.

PS: This took a long time to track down, because the fetch ended up encapsulated in a hitched method, with the negative start value already set as a parameter! I ended up having to break everytime that something called dojo.hitch. Yech!

Change History (1)

comment:1 Changed 12 years ago by Nathan Toone

Resolution: invalid
Status: newclosed

If you want to clear the selection, just call grid.selection.deselectAll(). You shouldn't be accessing negative row indexes, as the grid uses them internally to mean different things (headers, etc.)

Note: See TracTickets for help on using tickets.