Enhanced Search Widget Code Question

513
2
04-28-2010 12:50 PM
JamesFaron
Occasional Contributor
This question is probably best answered by Robert, if not only answerable by Robert. For the sake of my education if not also sanity, can you tell me what portion of either the SearchWidget or SearchWidgetFloatingdg pertains to the bug fix regarding populating an open floating datagrid when changing the data with a new search? I believe this happened in version 1.06. I am deriving a floating datagrid for another widget, and I haven't been able to find a way to populate the open datagrid when changing the data returned by the query.

Thanks,
Jim Faron
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Jim,

   Hope I remember how this works!;) I think it is there in these lines when the queryFeaturesText or the QueryFeaturesGraphical function are run.
if (myfloatdg){
        if(myfloatdg.datagrid.dataProvider)
         myfloatdg.datagrid.dataProvider.removeAll();
        myfloatdg.csvName = _csvName;
        myfloatdg.dgAliases = fldAliases;
        myfloatdg.dgColumns = gridFields;
        myfloatdg.dgHyperColumns = gridHyperFields;
        myfloatdg.showHyperAlias = gridHyperFieldsAlias;
        myfloatdg.dProvider = gridDataProvider;
        myfloatdg.graphicslayer = graphicsLayer;
        myfloatdg.zoomScale = zoomScale;
        myfloatdg.ownerWidget = sWidget;
basically I clear the datagrid of all info and field structure and then re-assign them.
0 Kudos
JamesFaron
Occasional Contributor
Robert,

Yes, that was it. I was close: I did not include the myfloatdg.graphicslayer = graphicsLayer; , I only input the columns and aliases below 'myfloatdg.datagrid.dataProvider.removeAll();

Thanks again for the help.

Jim Faron
Austin Independent School District
Austin, TX
0 Kudos