dojo grid on click showing error

1507
3
05-11-2016 10:23 AM
ADITYAKUMAR1
Occasional Contributor III

HI Users,

  I am following this example.Show find task results in a DataGrid | ArcGIS API for JavaScript

But after some number of search if i click on the grid it throws me the following error.

0x800a138f - JavaScript runtime error: Unable to get property 'toJson' of undefined or null reference

And I am not able to zoom to the location.

Any idea what is creating trouble here.

Thanks

Aditya Kumar

Tags (1)
0 Kudos
3 Replies
thejuskambi
Occasional Contributor III

The sample does not contain the use of "toJson" function. And I am not able to reproduce the behaviour you mentioned with the sample.

Does your code use it anywhere? Could you share that.

0 Kudos
ADITYAKUMAR1
Occasional Contributor III

function onRowClickHandler(evt) {

    var clickedId = evt.grid.getItem(evt.rowIndex).OBJECTID;

    if (AssetSelected == "XXX") {

        var selectedFeature1 = new dojo._base.array.filter(DREAM_2D_Feature_Well.getSelectedFeatures(), function (graphic) {

            return ((graphic.attributes) && graphic.attributes.OBJECTID === clickedId);

        });

    }}

0 Kudos
KenBuja
MVP Esteemed Contributor

Can you post your full code?

0 Kudos