Greg,
Are the items in your list box the same objects that are in the 
datagrid?  If so and your dataprovider is an ArrayCollection, then 
use myDataGrid.dataProvider.getItemIndex(obj:Object).  If not, then 
you have to come up with a way to efficiently search the dataProvider.

As for the programatic click; why not just call the event handler 
directly?  If you must have the click event, you will have to build 
it yourself and use myDataGrid.dispatchEvent(evt:Event).

Hope that helps.
Dom

--- In [email protected], "gbkpicasso" <[EMAIL PROTECTED]> wrote:
>
> I have a list box of items that can be found in a datagrid. When a 
> user clicks on an item in the list box I would like to find the row 
in 
> the datagrid that contains that same data.
> 
> Then I would like to scroll to that row in the datagrid so it is 
> visible to the user - myDataGrid.scrollToIndex(rowNumFoundAbove)
> 
> Then cause that row to be clicked programmatically so the current 
code 
> for the click event of the datagrid is triggered.
> 
> Do I need to search every row of the datagrid to look for the row I 
> need?
> 
> How do I force a row in a datagrid to be clicked programattically?
> 
> Thanks
> Greg
>


Reply via email to