Phillip, This what I got to work for me (I think I ran into a Flex Viewer Bug with it's top attribute). private function showGridResults():void
{
try
{
if(gridFields.length == 0){
showMessage("No Datagrid configured for this layer", false);
return;
}
if(!myfloatdg){
myfloatdg = SearchWidgetFloatDG(PopUpManager.createPopUp(map,SearchWidgetFloatDG,false,PopUpManagerChildList.POPUP));
//PopUpManager.centerPopUp(myfloatdg);
myfloatdg.y = map.height + Number(ViewerContainer.getInstance().mapManager.top) - myfloatdg.height;
myfloatdg.x = 0;
}else{
var exists:Boolean = false;
for (var p:Number=0;p<systemManager.popUpChildren.numChildren;p++) {
if(systemManager.popUpChildren.getChildAt(p) is SearchWidgetFloatDG)
{
exists = true;
break;
}
}
if(exists == false)
PopUpManager.addPopUp(myfloatdg,map,false);
//PopUpManager.centerPopUp(myfloatdg);
myfloatdg.y = map.height + Number(ViewerContainer.getInstance().mapManager.top) - myfloatdg.height;
myfloatdg.x = 0;
}
if(!gridFields)
gridFields = configSearchText[0].gridfields;
myfloatdg.enableExport = configSearchText[0].enableexport;
myfloatdg.layerDetails = queryLayer.layerDetails;
myfloatdg.csvSeperator = csvSep;
myfloatdg.csvExportOptionLbl = exp2csvOptLbl;
myfloatdg.txtExportOptionLbl = exp2txtOptLbl;
myfloatdg.ExportButtonLbl = expBtnLbl;
myfloatdg.csvName = _csvName;
myfloatdg.sumField = sumField;
myfloatdg.labelSum = lblSum;
myfloatdg.dgFieldAliases = fldAliases;
myfloatdg.dgColumns = gridFields;
myfloatdg.dgHyperColumns = gridHyperFields;
myfloatdg.dProvider = gridDataProvider;
myfloatdg.graphicslayer = graphicsLayer;
if(lState == "graphicalInput"){
var i2:Number = cboLayerGraphical.selectedIndex;
zoomScale = configSearchGraphical[i2].zoomscale;
myfloatdg.enableExport = configSearchGraphical[i2].enableexport;
}else if (lState == "textInput"){
var i:Number = cboLayerText.selectedIndex;
zoomScale = configSearchText.zoomscale;
myfloatdg.enableExport = configSearchText.enableexport;
}
myfloatdg.zoomScale = zoomScale;
myfloatdg.ownerWidget = this;
}
catch (error:Error)
{
showMessage(error.message, false);
}
}