AnsweredAssumed Answered

cannot select dgrid row when feature on map is selected

Question asked by derekwaynemiller on Nov 8, 2012
Latest reply on Nov 21, 2012 by derekwaynemiller
Hello all,

I'm currently working on an application that contains a feature layer (points) linked to a dgrid. I'm running into problems selecting the appropriate row in the dgrid when a feature on the map is selected.

I've defined a global variable that contains the unique feature name as a proxy for an id. This variable is overwritten each time the feature layer selection changes, by either clicking on a new feature or by scrolling through records in the popup. This much is functioning properly (writing the feature name to the console to verify).

I am hoping that I can select the appropriate row in the grid based on this variable as opposed to re-querying the feature layer.

I'm currently receiving a 'non_object_property_call' to the error console as a result of the _Row element being null, even though I am able to write the _Row object to the console and determine that the _Row id matches the feature name variable.

Code for my select grid function is this:
function selectGrid() {     console.log("selecting grid");     console.log(featureName);     var row = grid.row(featureName);     console.log(row);     rowID =;     console.log(rowID);     if ( === featureName) {       console.log("derek sucks");       //selectRow(row);       grid.row(featureName).element.scrollIntoView();     } }

Also note that I'm using a dgrid/Grid as opposed to dgrid/onDemandGrid.

Any thoughts?

- d