0
votes


i have a datagrid in my flex application, i am binding datagrid with arrayCollection, now i want to add checkbox control to datagrid column and i dont want to bind chekcbox to arraycollection values. i want something like this without binding checkbox column field with arryayCollection.

1
@ hering ..i want checkbox with each row of datagrid, so user can select multiple rows by selecting checkbox.user594979

1 Answers

1
votes

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.