In your CheckBoxCellRenderer class you could add a static variable called “anySelected.”  Then you could bind the enabled property of the CheckBox in your renderer to !anySelected || myCB.selected and then in the click handler of your CheckBox set anySelected to myCB.selected.

 

So here’s a snippet:

 

<mx:Script>

  public static var anySelected:Boolean = false;

</mx:Script>

<mx:CheckBox id=”myCB” enabled=”{!anySelected || myCB.selected}” click=”anySelected = myCB.selected” />

 

Hope this helps,

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of jagabcdeff
Sent: Thursday, December 08, 2005 1:58 AM
To: [email protected]
Subject: [flexcoders] checkCellRender Validation

 

Hi ,

I am working on "cellRenderer" which looks like below code.

<mx:DataGrid id="pqrs" width="100%" height="100%" dataProvider="{xyz}"
>
  <mx:columns>
            <mx:Array>
            <mx:DataGridColumn headerText="#" width="21" 
columnName="lstcheck" editable="true"
cellRenderer="CheckBoxCellRenderer" />
            <mx:DataGridColumn headerText="Item Name"
columnName="item_Name" />

      </mx:Array>
     </mx:columns>
  </mx:DataGrid>

The above code is showing Checkbox in DataGrid.
I have no.of checkboxes with same no.of "Item Name"s.

Now i want to validate on checkboxs means that when i check any one
check box the remaining checkboxes should be disabled and again
unchecked same checked box remaining checkeboxes should be enabled.

can anyone provide code for above validation?

Any help is greatly appreciate..

Jagadeesh












--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to