开发者

flex : add checkbox to datagrid control

i have a datagrid in my flex application, i am binding datagrid with arrayCollection, now i want to add chec开发者_StackOverflow社区kbox 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜