<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
[Bindable]
public var ac:ArrayCollection=new
ArrayCollection([{userPassword:'ss',userId:1},
{userPassword:'dd',userId:2}
]);
public function valueCheck(event:Event, chk1:Object):void
{
if(chk1.selected)
{
Alert.show(“Hi I am selected”);
}
if(!chk1.selected)
{
Alert.show(“Hi I am not selected”);
}
}
]]>
</mx:Script>
<mx:DataGrid id=”dg2″ dataProvider=”{ac}” x=”116″ y=”46″>
<mx:columns>
<mx:DataGridColumn headerText=”Password” dataField=”userPassword”/>
<mx:DataGridColumn headerText=’UserId’ dataField=”userId”/>
<mx:DataGridColumn headerText=”Please Select”>
<mx:itemRenderer>
<mx:Component>
<mx:VBox>
<mx:CheckBox id=”chk” change=”outerDocument.valueCheck(event,chk)”/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:Application>
On Thu, Jan 28, 2010 at 12:38 PM, FlexiSush <[email protected]> wrote:
> hey u can check out
>
>
> http://flexphpworld.wordpress.com/2010/01/28/using-checkbox-as-item-renderer-in-datagrid
>
>
> On Jan 27, 1:43 am, Soumya Here <[email protected]> wrote:
> > Hi All,
> >
> > In my case, I got an ArrayCollecion from RemoteObject call and populate a
> > Datagrid for display in front end.
> >
> > There I want to add a checkbox for select a specific row of data from
> that
> > Datagrid and at the end when I click on the save button I want to catch
> only
> > the selected rows so that I can send to backend java for update the DB.
> >
> > I create and render a checkbox for that purpose and I also able to show
> that
> > rendered checkbox to that Datagrid, but not able to proceed
> > further......Need some code.
> >
> > Please help me out.
> >
> > Thanks in advance.
> >
> > Thanks,
> >
> > Soumya
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.