On Mon, Dec 29, 2008 at 7:29 AM, Manu Dhanda <[email protected]> wrote:

> I have CheckBox as an itemrenderer. and a custom sorting function for one
> another column.
>
> But once I sort that another column and after that try to use checkbox(to
> select items), why every selection of checkbox make a call to that custom
> sorting function??

Because when an item has been modified, either externally or through
an item editor, the sort order indicated by the column's sort
indicator (the arrow at the top) may have become invalid. The DataGrid
has two options here: (1) remove the sort indicator, or (2) resort the
collection with the new data. It chooses to resort.

One workaround is to listen for the 'itemEditBeginning' event and
reset the sort order on the collection.

 itemEditBeginning="dataGrid.dataProvider.sort = null"

This won't remove the sort arrow though -- a small discrepancy.

I think this is a usability problem. The DataGrid should disable
automatic sorting when the user is editing the cells; otherwise, the
cells will move about every time the user tabs from one cell to
another, and that's not a very nice experience.

Manish

Reply via email to