Hi, i'm having a little trouble and googled everywhere but
nothing has helped me so far. So I'm turning to the pros to help me
sort this one out. Please help, thanks a ton.
I want to link two dataGrids such that the data in the second
grid should be based on the selectedItem in the first grid.
I have names of ppl in the 1st grid, and i want their
respected ages to show in the 2nd grid
I have two arrayCollections specified, one for each data grid
private function showAges()
//what to enter here to link the data of the two grids?
ages.dataProvider.name = names.selectedItem.name; //?????
THIS DOESN'T SEEM TO WORK
I'm not sure if I follow what you are tryiing to accomplish,
but here are some thoughts.
1. Your two arrayCollections hold redundant data so it seems
from your example data that you only need your d2 collection. You
can then specify which field to display in your two dataGrids only
using one arrayCollection. Here is the code for that:
2. If you have two arrayCollections with independent data
then you could link them by setting the ages dataProvider to the
index of the selected names dataGrid, but this seems to be a less
than ideal data structure.