Solved! Go to Solution.
window.statesUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0";
By this I mean,
every row I select from the grid, thats the line that shows in the map.
Cheers