flex : add checkbox to datagrid control
Write an itemRenderer which is a checkBox, and handle change event. On change, set a property in the data to the selected boolean. Ex: data.rowIsSelected = checkBox.selected; The property does not need to already exist in the dataProvider.
Override set data property, and specify the check box's selected property to be the same as data.isRowSelected.
Later on, you can loop through the data set and get each item in the dataProvider's isRowSelected property to see if user had selected it or not.
精彩评论