Rene,Thanks again for the follow up. Your method works in an environment of one application generating and defining the two grids. My problem is that the floating datagrids are separate, generated in one widget by two different functions but each defined in it's own title window. So in my environment, my problem is that I can't access the second grid from the first grid. In other words, I need to be able to access Datagrid 2 from Datagrid1 in the item click event of datagrid1, and I keep getting the null object error 1009. The first grid is created thusly:private function showGridResults(event:MouseEvent):void
{
try
{
if(!gridFields){
showMessage("No Datagrid configured for this layer", false);
return;
}
if(!myfloatdg){
myfloatdg = rbeWidgetFloatDG(PopUpManager.createPopUp(map,rbeWidgetFloatDG,false));
PopUpManager.centerPopUp(myfloatdg);
}else{
PopUpManager.addPopUp(myfloatdg,map,false);
PopUpManager.centerPopUp(myfloatdg);
}myfloatdg.ownerWidget = this;
}
My second data grid is created as follows:private function showResultsWindow():void
{
// resultsWindow.dgData.dataProvider = gridDataProvider;
resultsWindow = ResultsWindowPub(PopUpManager.createPopUp(map, ResultsWindowPub, false));
resultsWindow.dgData.dataProvider = busStopData;
resultsWindow.visible = true;
resultsWindow.inUse = true;
resultsWindow.move(10, map.height - 295);
}
private function filterrecAC(item:Object):Boolean {
if(String(item.STOP_ID)== "0"){
return false;
}
return true;
}
I've tried to apply your code in the first floating datagrid's item click event. Problem is accessing the data in second datagrid. I can import it into the first data gridimport com.esri.solutions.flexviewer.widgets.ResultsWindowPub
but I keep getting a null object error no matter how many ways I try to access the dataprovider of the second datagrid, although it will appear in FlexBuilder, e.g. var vRB:ResultsWindowPub = _bWidget as ResultsWindowPub;
dg2Source = vRB.dgData.dataProvider as ArrayCollection;
But I keep getting the null object error 1009 at that point, so that the code that I adapted from your suggestion is never even tested in this environment.