I think selectedIndex needs an integer. You'd have to loop over the data provider, figure out which one has capital==Paris' and then set the selectedIndex based on that.
You could also experiment with selectedItem; although I haven't experimented with setting that. d coda wrote: > > > Hi all > > I need to programmatically select a particular row in a datagrid and > cannot see how it is done. I want to do the same as if the user > clicked on a row only programmatically. > > Say I had a DataGrid with ID=dg containing two columns Countries and > Capitals. > > I want to be able to issue a command like: > > dg.selectedIndex = dg.capitals=="Paris "; > > ie to select the row that contains Paris in the Capitals column. > > As if the user selected the France/Paris row only doing it programmatically. > > I am thinking it must be a feature but cannot find it :( > > Please shed some light or even let me know if what I want sounds crazy. > > -D > > -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: <http://www.dot-com-it.com> My Podcast: <http://www.theflexshow.com> My Blog: <http://www.jeffryhouser.com>

