Rather than loop over the datagrid cells after the fact, why not enable disable the combobox during instantiation, in the setValue() method? You have the data you need for the conditional, and you have a direct reference to the control....
Tracy -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of thisdudenamedjon Sent: Thursday, August 18, 2005 8:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Accessing cells in a datagrid. I have a datagrid with various cellrenderer's in the different columns. One particular cellrenderer uses a combo box. I would like to conditionally enable/disable this combo box based on a particular field in my datagrid's dataprovider. Currently, I am using the following code to iterate through the rows and invoking a cellrenderer's method to enable/disable. However, I am encountering the problem where the rows array property has only length 7 (the visible rows in the datagrid) and anything else I access is undefined. I found this rows property using the Inspector component. Thus, I am only able to enable/disable the first 7 (visible) rows in the datagrid and in the event that I have more than 7 rows in my datagrid, I don't know how to access the other rows. // combobox is the 10th cellrenderer (cells[9].combo) // // detail = parent omponent // detailGrid = datagrid // gridDp = datagrid dataprovider // disables appropriate combo box for(var i:Number = 0; i < gridDp.length; i++) detail.detailGrid.rows[i].cells[9].combo.enabled = (gridDp [i].timerecordTrcSequenceNumber > 499) ? true : false; Is there a better way to do this? Any help would be greatly appreciated. Jon Chiu -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h6um9sg/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124421343/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> -- 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/