if you want to select all rows. try something like this.

relevant bits of code -

<mx:DataGrid id="dg" multipleSelection="true"/>
<mx:Button click="selectAll(event)"/>

function selectAll(event)//strongly type if its flex2 beta
{
  var array1:Array = new Array();
  for (var i=0; i<dg.dataProvider.length;i++)
  {
    array1.push(i);
  }
  dg.selectedIndices = array1;
}


--- In [email protected], "Robs" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>   I have a datagrid with 2 columns of which the first one has 
> a "checkbox" as the cell renderer. The checkbox is inside a 
separate 
> component. I have used the same component as the headerRenderer 
too. 
> Can anyone help me out in implementing the "Select all" feature 
found 
> in most mail clients?
> 
> Thanks in advance.
>






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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to