<?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 autofit column widths on FeatureTable in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autofit-column-widths-on-featuretable/m-p/1203949#M78333</link>
    <description>&lt;P&gt;I am using a FeatureTable very much like this one...&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just like in this example, the content of my first column is often long and consequently is cut short, while my second column contains a state abbreviation and can be much shorter. Unfortunately, the FeatureTable seems to be hard-coded to make every column the same width.&lt;/P&gt;&lt;P&gt;I am aware of the css trick to at least allow the cell to grow vertically when there is overflow...&amp;nbsp; vaadin-grid-cell-content {white-space: normal !important;}&lt;/P&gt;&lt;P&gt;And I tried to loop through all the "vaadin" cell elements with javascript, changing the style width=auto, also tried adding an "auto-width" attribute, also tried beating my head against the wall. Nothing seems to work.&lt;/P&gt;&lt;P&gt;Is there some undocumented way to tell the table to try to autofit column width? This seems like it should be a property of the TableTemplate and/or the ColumnTemplate, but no luck. If varying column widths is not an option in the FeatureTable, any ideas how I might hack the example above to make the second column narrower and the first column wider?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 20:25:54 GMT</pubDate>
    <dc:creator>WCSOLET</dc:creator>
    <dc:date>2022-08-17T20:25:54Z</dc:date>
    <item>
      <title>autofit column widths on FeatureTable</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autofit-column-widths-on-featuretable/m-p/1203949#M78333</link>
      <description>&lt;P&gt;I am using a FeatureTable very much like this one...&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just like in this example, the content of my first column is often long and consequently is cut short, while my second column contains a state abbreviation and can be much shorter. Unfortunately, the FeatureTable seems to be hard-coded to make every column the same width.&lt;/P&gt;&lt;P&gt;I am aware of the css trick to at least allow the cell to grow vertically when there is overflow...&amp;nbsp; vaadin-grid-cell-content {white-space: normal !important;}&lt;/P&gt;&lt;P&gt;And I tried to loop through all the "vaadin" cell elements with javascript, changing the style width=auto, also tried adding an "auto-width" attribute, also tried beating my head against the wall. Nothing seems to work.&lt;/P&gt;&lt;P&gt;Is there some undocumented way to tell the table to try to autofit column width? This seems like it should be a property of the TableTemplate and/or the ColumnTemplate, but no luck. If varying column widths is not an option in the FeatureTable, any ideas how I might hack the example above to make the second column narrower and the first column wider?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 20:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autofit-column-widths-on-featuretable/m-p/1203949#M78333</guid>
      <dc:creator>WCSOLET</dc:creator>
      <dc:date>2022-08-17T20:25:54Z</dc:date>
    </item>
  </channel>
</rss>

