Hi Nikhil,

find the solution below:

 make Editable = true for advance datagrid
add "itemEditBeginning" event listener to grid
in the event handler "change the selected property to tru for the same
row as below:

gridData[event.rowIndex].selected = "true"; // where grid data is data
provider

hope this is the solutiuon to behavior you expected. Thanks!

On Apr 16, 7:54 am, Fehmina Kanuga <[email protected]>
wrote:
> hi, just try if this works
>
> <mx:DataGridColumn headerText="Critical" dataField="critical"
> rendererIsEditor="true" editorDataField="selected" color="#000000">
>
> <mx:itemRenderer>
>
> <mx:Component>
>
> <mx:VBox height="30" horizontalAlign="center">
>
> <mx:CheckBox id="chk" selected="{data.level_room == level_roomId.text*'*}"/>
>
> </mx:VBox>
>
> </mx:Component>
>
> </mx:itemRenderer>
> </mx:DataGridColumn>
>
> assign id to your textarea
>
> <mx:DataGridColumn headerText="Room" dataField="level_room"
> width="250" textAlign="center">
>        <mx:itemEditor >
>                <mx:Component>
>                        <mx:TextArea wordWrap="true"  editable="true"
> maxChars="45" id="level_roomId"  />
>                </mx:Component>
>        </mx:itemEditor>
> </mx:DataGridColumn>
>
> another sollution :
>
> write a private function :
> private function renderCheckbox():void {
>  if( level_roomId.text != null) {
>     chk.selected == true;}
>
>  else {
>    chek.selected == false;}
> }
>
> and
> <mx:CheckBox id="chk" selected = renderCheckbox()>
>
> chcek if this works.
> othrwise will give another solution
>
>
>
>
>
> On Thu, Apr 15, 2010 at 10:49 AM, nikhil <[email protected]> wrote:
> > Hi,
>
> > I have one datagrid where one column is for checkboxes and one column
> > is for TextArea.
>
> > So I used itemRenderer for checkbox like
> > <mx:DataGridColumn
> > itemRenderer="com.basepin.view.components.CenteredCheckBox"
> > rendererIsEditor="true" editorDataField="selected"
> > dataField="selected"/>
>
> > and for TextArea i used itemEditor like,
>
> > <mx:DataGridColumn headerText="Room" dataField="level_room"
> > width="250" textAlign="center">
> >        <mx:itemEditor >
> >                <mx:Component>
> >                        <mx:TextArea wordWrap="true"  editable="true"
> >  maxChars="45"   />
> >                </mx:Component>
> >        </mx:itemEditor>
> > </mx:DataGridColumn>
>
> > Now my problem is how to checked the checkbox on change in the
> > TextArea. When user enter some text in textArea the associated
> > checkbox should get checked automatically.
>
> > Thanks
>
> > --
> > 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%2bunsubscr...@googlegrou­ps.com>
> > .
> > 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 
> athttp://groups.google.com/group/flex_india?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
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.

Reply via email to