I'd like to programatically set rows as selected or unselected in a
datagrid. For example, select all the rows where a certain column has
the value x. What is the proper way to do this? I've tried setting the
flags that seems like they should do what I want, but to no avail.
This is my latest attempt, which throws no errors, but neither does it
select or unselect any rows.

function rowSelector( flipFlag:String ):Void {
  for ( var i=0; i < myDataGrid.length; i++ ) {
    if ( myDataGrid.rows[i].item.foo == flipFlag || flipFlag == '' ) {
      myDataGrid.listContent.listRow[i].state='selected';
    } else {
      myDataGrid.listContent.listRow[i].state='normal';
    }
  }
}

Any pointers? Perhaps I need to force the datagrid to redraw itself
after I set the selected rows? Or maybe I'm going about it all
wrong...you tell me. I'm sure there must be an easy way to do this,
but I'm low on reference material here, and Google hasn't helped me any.

Thanks,
Matthew




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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