I have a little misunderstanding about inline itemrenderers, as i mentioned earlier im new to flex please pardon me if this is a silly question..
I have an Advanceddatagrid, i have added a column of checkboxes usint inline itemrendered:
<itemrenderer = mx.controls.CheckBox">
i have the column defined as select i.e....
<AdvancedDatagridColumn id="select" itemrenderer="mx.controls.CheckBox">
i have a series of columns following this above column...i want to be able to select a particular row
upon the selection of the checkbox....i however doubt that im selecting the column("select") and not an individual
Or in better words "Is there a way where i can reference to these checkboxes individually" as im intending to do
some data inserting,deleting and updating activity depending upon the selected checkbox...
However i also intend to open another MXML file that contains only that data that is checked by the checkbox...
I request you experts to help me out with this....
Im trying to do this from 2 days now...., please help me out....
Thanks all in advance
Lets break the problem statement in multiple steps
1. We need a way to know the selection on all rows.
2. We need the association of the checkBox with the data
The solution is to use a arrayCollection/array that holds all the instances created for checkbox.This collection should be a property of component containing the datagrid. We need to use a custom component implementation or inline ItemRenderer. The way you have used is called dropinItemRenderer. Preferaly use custom component implementation and add the instance to the arrayCollection at CreationComplete. Make sure you use addItemAt so that you add the instance in the same row as the data. To get rowIndex the custom Checkbox should implement IDropInListItemRenderer. You could iterate this collection to check all the instances that are checked.
Note: This is the approach considering your dataprovider doesnt have a selection field.
Thanks for the reply....,i guess this is quite what i should be doing...it would be of great help if you could
post a code snippet or atleast refer a link where i can see how this done considering the fact that im totally new to flex...,
Thanks in advance again..