<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic jQuery grid select multiple rows in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608611#M87011</link>
    <description>&lt;P&gt;&lt;SPAN&gt;How would you select multiple rows? I have an array of data that i select from a map (Several different OBJECTIDS). I would like to be able to select the rows in the grid that have the same OBJECTIDS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are a few links of the example code i am trying to use to select multiple rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Select a row with value instead of index " href="https://www.jqwidgets.com/community/topic/select-a-row-with-value-instead-of-index/" target="_self"&gt;https://www.jqwidgets.com/community/topic/select-a-row-with-value-instead-of-index/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Select Rows" href="https://jsfiddle.net/jqwidgets/FQxrf/" target="_self"&gt;https://jsfiddle.net/jqwidgets/FQxrf/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//using a button to create the row selection
$(“#selectRowByValue”).on(‘click’, function () {
    var rows = $(‘#roomUseTable’).jqxGrid(‘getrows’);
    console.log(rowsCount)
    var myroomEditData = [];
    for (var i = 0; i &amp;lt; rows.length; i++) {
        const valueObjectID = $(‘#roomUseTable’).jqxGrid(‘getcellvalue’, i, “OBJECTID”);
        console.log(“roomsAssignedData Data from the map”)
        console.log(roomsAssignedData)

        myroomEditData.push(
            valueObjectID
        );
        console.log(“myroomEditData”)
        console.log(myroomEditData)
        //comparing the data from the map to the data in the grid
        const intersection = myroomEditData.filter(element =&amp;gt; roomsAssignedData.includes(element));
        console.log(intersection)

    };
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives me the OBJECTIDs in the grid. My example shows 3 rows and it gives me back the three rows OBJECTIDs (myroomEditData). When I select the data in the map it gives me the OBJECTIDs of the data that it selected (roomsAssignedData) from a different piece of code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I pass more than one value to get it to select (value == "Ikura”)? The values are in my array (myroomEditData). &amp;nbsp;I tried (value == &amp;nbsp;myroomEditData) but it only selects the 1st row even if that’s not the data selected in the map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2025 17:21:29 GMT</pubDate>
    <dc:creator>Mr_Kirkwood</dc:creator>
    <dc:date>2025-04-23T17:21:29Z</dc:date>
    <item>
      <title>jQuery grid select multiple rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608611#M87011</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How would you select multiple rows? I have an array of data that i select from a map (Several different OBJECTIDS). I would like to be able to select the rows in the grid that have the same OBJECTIDS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are a few links of the example code i am trying to use to select multiple rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Select a row with value instead of index " href="https://www.jqwidgets.com/community/topic/select-a-row-with-value-instead-of-index/" target="_self"&gt;https://www.jqwidgets.com/community/topic/select-a-row-with-value-instead-of-index/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Select Rows" href="https://jsfiddle.net/jqwidgets/FQxrf/" target="_self"&gt;https://jsfiddle.net/jqwidgets/FQxrf/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//using a button to create the row selection
$(“#selectRowByValue”).on(‘click’, function () {
    var rows = $(‘#roomUseTable’).jqxGrid(‘getrows’);
    console.log(rowsCount)
    var myroomEditData = [];
    for (var i = 0; i &amp;lt; rows.length; i++) {
        const valueObjectID = $(‘#roomUseTable’).jqxGrid(‘getcellvalue’, i, “OBJECTID”);
        console.log(“roomsAssignedData Data from the map”)
        console.log(roomsAssignedData)

        myroomEditData.push(
            valueObjectID
        );
        console.log(“myroomEditData”)
        console.log(myroomEditData)
        //comparing the data from the map to the data in the grid
        const intersection = myroomEditData.filter(element =&amp;gt; roomsAssignedData.includes(element));
        console.log(intersection)

    };
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives me the OBJECTIDs in the grid. My example shows 3 rows and it gives me back the three rows OBJECTIDs (myroomEditData). When I select the data in the map it gives me the OBJECTIDs of the data that it selected (roomsAssignedData) from a different piece of code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I pass more than one value to get it to select (value == "Ikura”)? The values are in my array (myroomEditData). &amp;nbsp;I tried (value == &amp;nbsp;myroomEditData) but it only selects the 1st row even if that’s not the data selected in the map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 17:21:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608611#M87011</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-04-23T17:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery grid select multiple rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608648#M87015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/481443"&gt;@Mr_Kirkwood&lt;/a&gt;,&amp;nbsp;thanks for posting your question here. Are you trying to use a jQuery grid with the ArcGIS Maps SDK for JavaScript? If so, you might want to check-out our FeatureTable:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 18:45:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608648#M87015</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2025-04-23T18:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery grid select multiple rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608713#M87018</link>
      <description>&lt;P&gt;I am using the&amp;nbsp;&lt;SPAN&gt;Query grid with the ArcGIS Maps SDK for JavaScript, and it works great. The grid has more functionality like drop down quick viewing of the data (attachment SMV_B). I can set up custom filtering and querying (attachment SMV_C).&amp;nbsp; I can also set up the grid to zoom to the data with an onclick and customize the export to excel and other formats.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have used the&amp;nbsp;FeatureTable and could not get the custom ability that I get from the grid. I will look at the examples you sent.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. I am using the&amp;nbsp;&lt;SPAN&gt;ArcGIS Maps SDK for JavaScript for most of my application.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 21:02:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1608713#M87018</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-04-23T21:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery grid select multiple rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1609915#M87062</link>
      <description>&lt;P&gt;Your question is off-topic, but I'll help.&lt;/P&gt;&lt;P&gt;First, you need to enable selection of multiple rows when you define your grid.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$("#roomUseTable").jqxGrid({
    selectionmode: 'multiplerows',
    ...
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the select function, assuming that roomsAssignedData is an array.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$("#selectRowByValue").on("click", function () {
    // get all rows
    var rows = $("#roomUseTable").jqxGrid("getrows");

    for (var i = 0; i &amp;lt; rows.length; i++) {
        // if value of field 'OBJECTID' is in roomsAssignedData array
        if (roomsAssignedData.includes(rows[i].OBJECTID)) {
            // add row to selection
            $('#roomUseTable').jqxGrid('selectrow', i);
        }
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 12:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1609915#M87062</guid>
      <dc:creator>Edvinas_S</dc:creator>
      <dc:date>2025-04-29T12:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery grid select multiple rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1609975#M87064</link>
      <description>&lt;P&gt;Wow, that helps me out tremendously! I appreciate the help. Sorry it was off topic. I have posted in other forums to no avail.&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 14:24:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/jquery-grid-select-multiple-rows/m-p/1609975#M87064</guid>
      <dc:creator>Mr_Kirkwood</dc:creator>
      <dc:date>2025-04-29T14:24:42Z</dc:date>
    </item>
  </channel>
</rss>

