multiple select from Dojo grid

4741
20
Jump to solution
01-28-2014 11:44 PM
ShaneCarey
New Contributor
Hey,

Has anybody used this example:

http://blogs.esri.com/esri/arcgis/2009/12/03/display-attributes-in-a-dojox-datagrid/

except changing the selectionMode to multiple

I have tried changing it but it will not work. I simple changed lines:

        <table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid"
              selectionMode="none">

to

        <table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid"
              selectionMode="multiple">

But nothing changes. Any row I click on the table, I need to highlight on the map.

Thanks
0 Kudos
20 Replies
ShaneCarey
New Contributor
Hey,

I got it. I had to add an extra layer for the states layer!!

Thanks very much for your help
0 Kudos
KenBuja
MVP Esteemed Contributor
If you had only one layer in your service, you would have set this for the url

window.statesUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0";


I use Visual Studios for my development environment. You should also look at using Firebug and the browsers' Developer Tools (F12 key) for debugging.
0 Kudos
ShaneCarey
New Contributor
Ok no worries, thanks. One quick question. How do I actually hide the layer on the map? I only want the lines to show that are selected.

Thanks again
0 Kudos
KenBuja
MVP Esteemed Contributor
This would work using FeatureLayers, using Definition Expressions. It would be a different workflow with ArcGISDynamicMapServiceLayers, since the graphics layer where you would show the results is separate.
0 Kudos
ShaneCarey
New Contributor
By this I mean,
every row I select from the grid, thats the line that shows in the map.

Cheers
0 Kudos
ShaneCarey
New Contributor
Hey,

I just published the service with no colour and that worked.

Thanks again for all your help
0 Kudos
KenBuja
MVP Esteemed Contributor
By this I mean,
every row I select from the grid, thats the line that shows in the map.

Cheers


The example I created this morning does just that. You don't need to create a service with no colors.
0 Kudos
ShaneCarey
New Contributor
Hey Ken,

I have many lines. Around 2000 flight lines (Tie lines and ordinary lines, Tie lines are perpendicular to ordinary), but only some are coming into my application and some are incorrectly displaying as Tie_lines when they should be lines.

Any idea why this is?

Thanks
0 Kudos
KenBuja
MVP Esteemed Contributor
Can you put this in JSBin?
0 Kudos
ShaneCarey
New Contributor
Will send first thing tomorrow, on Irish time here.
Cheers
0 Kudos