tweensteeples
asked on
Flex 4.x in-line checkbox item editor/renderer using advanced datagrid control
I need some expert help with this item editor problem. I have the following advanced datagrid control and it is working well using a combobox as an in-line editor, however I need to swap the combobox for a checkbox which seemed straight-forward enough,however, I need the checkbox item editor / rendererer to do the following:
1. When the checkbox is selected the data in the cell needs to change to "true" as it does with the combobox.
2. Checkbox item editor/renderer needs to display the true or false value as selected or not selected, just as the combobox does.
3. Checkbox must not display in grouping header field. It must only display in the children of the grouping collection. (grouping collection is not shown in the code). I tried setting the depth in the datagrid and it still displayed a checkbox in the row(s) containing the grouping field.
For some reason when I change the in-line control to a checkbox and set the
editorDataField="selected" the cell the datagrid is not changing the data to the selected value.
I have a "save" button that commits all the changes made to the datagrid to the database and it works beautifully if I use a combobox as an in-line control.
I can get it to dis0play the cell data value by using the item editor and setting editorDataField="selected"
<fx:Declarations>
<fx:Component id="inlineEditor">
<mx:ComboBox >
<mx:dataProvider>
<fx:String>true</fx:String >
<fx:String>false</fx:Strin g>
</mx:dataProvider>
</mx:ComboBox>
</fx:Component>
</fx:Declarations>
<mx:AdvancedDataGrid id="adg1" width="79%" height="100%" creationComplete="adg1_cre ationCompl eteHandler (event)"
dataProvider="{getAllRoles permission sResult.la stResult}"
designViewDataType="tree" horizontalScrollPolicy="au to" editable="true"
width="100%" height="100%">
<mx:columns>
<mx:AdvancedDataGridColumn width="265" dataField="permission"
headerText="Permission"/>
<mx:AdvancedDataGridColumn id="g1" width="155" dataField="reportsall"
headerText="Reports All" editorDataField="selectedI tem"
itemEditor="{inlineEditor} " >
</mx:AdvancedDataGridColum n>
</mx:columns>
</mx:AdvancedDataGrid>
<s:Button x="10" y="400" label="Save" click="rolespermissionsSer vice.commi t()"/>
Your help would be very much appreciated.
Thanks Experts!
1. When the checkbox is selected the data in the cell needs to change to "true" as it does with the combobox.
2. Checkbox item editor/renderer needs to display the true or false value as selected or not selected, just as the combobox does.
3. Checkbox must not display in grouping header field. It must only display in the children of the grouping collection. (grouping collection is not shown in the code). I tried setting the depth in the datagrid and it still displayed a checkbox in the row(s) containing the grouping field.
For some reason when I change the in-line control to a checkbox and set the
editorDataField="selected"
I have a "save" button that commits all the changes made to the datagrid to the database and it works beautifully if I use a combobox as an in-line control.
I can get it to dis0play the cell data value by using the item editor and setting editorDataField="selected"
<fx:Declarations>
<fx:Component id="inlineEditor">
<mx:ComboBox >
<mx:dataProvider>
<fx:String>true</fx:String
<fx:String>false</fx:Strin
</mx:dataProvider>
</mx:ComboBox>
</fx:Component>
</fx:Declarations>
<mx:AdvancedDataGrid id="adg1" width="79%" height="100%" creationComplete="adg1_cre
dataProvider="{getAllRoles
designViewDataType="tree" horizontalScrollPolicy="au
width="100%" height="100%">
<mx:columns>
<mx:AdvancedDataGridColumn
headerText="Permission"/>
<mx:AdvancedDataGridColumn
headerText="Reports All" editorDataField="selectedI
itemEditor="{inlineEditor}
</mx:AdvancedDataGridColum
</mx:columns>
</mx:AdvancedDataGrid>
<s:Button x="10" y="400" label="Save" click="rolespermissionsSer
Your help would be very much appreciated.
Thanks Experts!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Then please close this question by accepting your own previous comment.