POST
|
You can look at your service directory to see how the field names are listed. if the field listed as PAD.LP_PAD.OBJECTID, then the statement should be clickedTaxLotId = grid.getItem(evt.rowIndex).PAD.LP_PAD.OBJECTID[0]. the best way to find out is to debug the statement. Thanks for your advice, have to try to debug the code.
... View more
06-06-2011
10:50 PM
|
0
|
0
|
314
|
POST
|
Try this: either change clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID to clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID[0], or loose up the comparsion graphic.attributes.OBJECTID === clickedTaxLotId to graphic.attributes.OBJECTID == clickedTaxLotId Tried both..it does not working. Seems like does not know/understand OBJECTID because the field is called PAD.LP_PAD.OBJECTID. if no substring used (spatial does not join with other table), then I can use OBJECTID only
... View more
06-05-2011
11:35 PM
|
0
|
0
|
314
|
POST
|
Hi, I have a spatial layer which is join with a table, therefore all the field name will be in substring like PAD.LP_PD.OBJECTID. I have no issue to run query from the substring, but i am stuck at function to zoom to selected feature/polygon when user click a row in datagrid(result from query). Below is the code: //Zoom to the parcel when the user clicks a row function onRowClickHandler(evt){ var OBJECTID = ("PAD.LP_PAD.OBJECTID"); var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID; var selectedTaxLot; dojo.forEach(map.graphics.graphics,function(graphic){ if((graphic.attributes) && graphic.attributes.OBJECTID === clickedTaxLotId){ selectedTaxLot = graphic; return; } }); var taxLotExtent = selectedTaxLot.geometry.getExtent(); map.setExtent(taxLotExtent); } I have tried using this declaration: var clickedTaxLotId = grid.getItem(evt.rowIndex).(PAD.LP_PAD.OBJECTID); var clickedTaxLotId = grid.getItem(evt.rowIndex).valueOf(PAD.LP_PAD.OBJECTID); but those two declaration will take the whole result in datagrid, not the exact selected row. Please advice.. Suggestion is highly appreciated.
... View more
06-02-2011
12:46 AM
|
0
|
4
|
818
|
POST
|
have you found the solution? mine is coded this way: layerDefs[0] = "ZON='DATE = TO_DATE('"+ (dojo.byId('DATE').value) +"','YYYY-MM-DD')";
... View more
07-05-2010
10:29 PM
|
0
|
0
|
349
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|