Flex AdvancedDatagrid editable but not allowed to change data
I have an advanced datagrid, but I want users to allow to copy some lines they want. when I use the property editable
they are allowed to select the text they need, but they also are allowed to edit this. How can I prevent that?
I want users to be able to select开发者_StackOverflow中文版 any text in the datagrid, but they are not allowed to change the value of the grid. They should only be allowed to select and copy (ctrl + c).
One of possible solitions is:
Create
SelectableItemRenderer
that extendsAdvancedDataGridItemRenderer
. In class constructor write:public function SelectableItemRenderer() { super(); selectable = true; }
Set
SelectableItemRenderer
as grid item renderer.
Problem solved. I've put an text input component in the item editor of the advancedDataGridColumn and that worked! Just set the advancedDatagrid editable true and on the textinput editable false!
精彩评论