RE: [flexcoders] Re: checkbox itemEditor in DataGrid

2009-02-02 Thread Tracy Spratt
Set the selectedIndices array to the array of indexes you want selected.
Of course you must set multiple select on the data grid.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Saturday, January 31, 2009 3:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: checkbox itemEditor in DataGrid

 

how to keep many rows highlighted in datagrid with AS code?

Thanks

Mark

 



RE: [flexcoders] Re: checkbox itemEditor in DataGrid

2009-01-30 Thread Tracy Spratt
The safest way would be to loop over the dataProvider, checking the
value of the property that drives the checkbox state, and build an array
of indexes that are checked.  Then assign that to the data grids
selectedIndices property,

 

If you could be sure to never get off, you could manipulate the
selectedIndices array directly.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Friday, January 30, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: checkbox itemEditor in DataGrid

 

The link can make select multiple rows,but how to make the all the
selected rows highlighted.

Thanks

Mark

http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf
http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf


 



RE: [flexcoders] Re: checkbox itemEditor in DataGrid

2009-01-30 Thread Tracy Spratt
In the event handler, you can access the itemRenderer through the target
or currentTarget properties.  From there you can get at the data item
object and thus get the index of the item(see the Collection api for the
exact method).

 

But better to loop over the dataProvider and check the selected property
every time.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Friday, January 30, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: checkbox itemEditor in DataGrid

 

The link can make select multiple rows,but how to make the all the
selected rows highlighted.

Thanks

Mark

http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf
http://blogs.adobe.com/aharui/CheckBoxDataGrid/CheckBoxDataGridApp.swf