Hello all,
I found this thread - Add more selection parcels to current datagrid able to select additional parcel(s) to current datagrid but is there possible to click a button to remove current any highlighted parcels on a map? Besides that, I found an error message. If the parcels have been selected and you accidentally reselect it again then you will get an error message. So can you ignore it or prevent the error message so the datagrid table will still got the same results from your early search instead of showing error message on datagrid?
Ken also provided code in fiddle:
Edit fiddle - JSFiddle
Thank you.
J
Can someone give me some ideas how to do this? At least get rid of the error message. Thank you.
I try update the code but still got error message if reselect the same parcel that already showed on the datagrid.
Thank you Ken.
It was an easy fix for that error. Edit fiddle - JSFiddle
The code added the newly selected parcel into an array. I just added an if statement to check whether the new parcels were already in that array.
arrayUtils.forEach(newparcelItems, function (item) { if (parcelItems.indexOf(item) !== 0){ parcelItems.push(item); } });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.