How to disable automatic sorting in Editable Datagrid in Flex 4

I have an editable datagrid. If sorting is applied by clicking on any datagrid header, it works fine. But after that, if the data values ​​change in any row of the datagrid, sorting is applied automatically. How to prevent this behavior? that is, sorting should only be applied if the user clicks on any datagrid header and sorting should not be applied when the user modifies the data in the grid.

+3
source share
3 answers

You must set sortableColumnsto false and handle the event headerReleasewhere you randomly sort manually in the data source.

<mx:DataGrid sortableColumns="false" headerRelease="onHeaderRelease(event)" ...
+4

Object(owner).dataProvider.disableAutoUpdate(), .

+1

, Flex 4, , , Flex 3, .

, , - . , [Bindable]. , , PropertyChange.

[Bindable], : http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_4.html

0

All Articles