<?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 Re: FeatureTable widget some rows set highlight the background color? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1275048#M80730</link>
    <description>&lt;P&gt;In my code：&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.viewFeatureTable //that is FeatureTable()

// In some where 
this.viewFeatureTable = new featureTable({
      container: this.datatableRef.nativeElement,
      ...some other properties
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After create&amp;nbsp; new FeatureTable(),use`.when()`and put the above code.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Apr 2023 00:46:26 GMT</pubDate>
    <dc:creator>mqllin</dc:creator>
    <dc:date>2023-04-04T00:46:26Z</dc:date>
    <item>
      <title>FeatureTable widget some rows set highlight the background color?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1252752#M80094</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;I have some ideas. Can I do something to dynamically set a custom highlighted background color for some rows in the table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;For example：all rows with an update table field value of 1 are set to green background.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 05:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1252752#M80094</guid>
      <dc:creator>mqllin</dc:creator>
      <dc:date>2023-01-30T05:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable widget some rows set highlight the background color?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1254241#M80146</link>
      <description>&lt;P&gt;I have achieved this effect!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I read about vaadin ui document, the framework that the table relies on, which provides a method to customize the table color.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;look code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.viewFeatureTable.when().then(table =&amp;gt; {
        setTimeout(() =&amp;gt; {
          let style = document.createElement('style');
          style.textContent = `
            .tb-row-add {
              background: rgba(54,173,71,0.3);
            }
            .tb-row-update {
              background: rgba(1,122,194,0.3);
            }
      `;
          const ref = document.getElementsByTagName('vaadin-grid')[0];
          ref.shadowRoot?.appendChild(style);
          (this.viewFeatureTable as any).grid._grid.cellClassNameGenerator = (column: any, model: any) =&amp;gt; {
            let classes = '';
            if (model &amp;amp;&amp;amp; model.item) {
              classes += column.path;
              const item = model.item;
              if (item.feature.attributes.update_type === 'add') {
                classes += ' tb-row-add';
              } else if (item.feature.attributes.update_type === 'update') {
                classes += ' tb-row-update';
              }
            }
            return classes;
          };
        }, 1000);
        this.tableToolsService.viewFeatureTable$.next(table);
      });&lt;/LI-CODE&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;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Feb 2023 08:26:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1254241#M80146</guid>
      <dc:creator>mqllin</dc:creator>
      <dc:date>2023-02-02T08:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable widget some rows set highlight the background color?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1274440#M80716</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/653863"&gt;@mqllin&lt;/a&gt;&amp;nbsp;I am trying to implement this on new FeatureTable. Where do you put the above code at? Can you share more of your code?&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 17:52:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1274440#M80716</guid>
      <dc:creator>MrGIS</dc:creator>
      <dc:date>2023-04-02T17:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable widget some rows set highlight the background color?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1275048#M80730</link>
      <description>&lt;P&gt;In my code：&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.viewFeatureTable //that is FeatureTable()

// In some where 
this.viewFeatureTable = new featureTable({
      container: this.datatableRef.nativeElement,
      ...some other properties
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After create&amp;nbsp; new FeatureTable(),use`.when()`and put the above code.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 00:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-widget-some-rows-set-highlight-the/m-p/1275048#M80730</guid>
      <dc:creator>mqllin</dc:creator>
      <dc:date>2023-04-04T00:46:26Z</dc:date>
    </item>
  </channel>
</rss>

