Just found I can stop it dead with an enabled="false" on the cb itself:
<mx:CheckBox
selected="{data.rmvDir == 'true'}" paddingLeft="10" enabled="false"
but I cannot get to the checkbox with actionscript because Flex will not
let me give the checkbox an id to reference it with ...
<mx:CheckBox id="cbRmv" = id attribute is not allowed on the root tag of
a component ...
if the solution is me having to individually disable the 11 checkbox
columns on the 3 grids, how can I reference them? I suppose I could bind
i.e. enabled = "{mode=='VIEW'}" but curious on the AS reference,
TIA,
Mic.
--- In [email protected], "Mic" <chigwel...@...> wrote:
>
> In a very conventional corporate app with View, Insert, Edit, Delete
> modes, certain datagrids must be view only in Edit mode. It really
> surprises me that on a datagrid, with editable=false, enabled=false,
> selectable=false, the checkboxes in a grid column can still be
clicked.
> I am creating the checkboxes with:
>
> <mx:DataGridColumn id="dgcRmv" headerText="Remove" width="100">
> <mx:itemRenderer>
> <mx:Component>
> <mx:CheckBox
> selected="{data.rmvDir == 'true'}" paddingLeft="10"
> labelPlacement="right"
> change="outerDocument.cbRmvDirHandler(event)"/>
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
>
> With everything turned off on the grid, the cb can be checked and the
> handler runs. Appreciate a solution to this. TIA,
>
> Mic.
>