<?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 dgrid OnDemandGrid header and content columns not aligned in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dgrid-ondemandgrid-header-and-content-columns-not/m-p/1218821#M78905</link>
    <description>&lt;P&gt;I have a dgrid (OnDemandGrid, DGridSelection) within a dijit ContentPane (within a BorderContainer) that displays over a map. The grid contains a header row (labels) and the content rows are data from a FeatureLayer. As the map is moved, the server is queried and the data updates and refreshes:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimDietz_0-1664914807769.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52860i5E21FBCDEC5AD79E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimDietz_0-1664914807769.png" alt="TimDietz_0-1664914807769.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note that despite the scrollbar, the header and content columns are aligned.&lt;/P&gt;&lt;P&gt;However, I now need to display two similar grids, so I've wrapped the ContentPane within a TabContainer. Everything functions as I need it to, except the content column widths no longer match the header column widths:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimDietz_1-1664915188086.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52862iAB510C6FBD9856AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimDietz_1-1664915188086.png" alt="TimDietz_1-1664915188086.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have use the debugger to modify the CSS in every way I can think of, but I've hit a wall.&amp;nbsp; If anyone has any advice, I'd really appreciate it.&lt;/P&gt;&lt;P&gt;(This is coded within a class method in TypeScript):&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;const DataGrid = declare([OnDemandGrid, DGridSelection]);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;private dataGrid: any;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;private dataGridTabContainer: TabContainer;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// columns and store are parameters passed to the method.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;columns: { field: string; label: string }[];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;store: Memory; // from 'dstore/Memory'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this.dataGrid = new DataGrid(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;columns,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;bufferRows: Infinity,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;selectionMode: 'single',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;collection: store,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;'dataGrid'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;this.dataGrid.startup();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this.dataGridTabContainer = new TabContainer({&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;style: "height: 100%; width: 100%;"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}, "dataGridTC");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// Note only one tab for now to simplify troubleshooting.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;var cp1 = new ContentPane({&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;title: "Sites",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;content: this.dataGrid // Add the grid to the pane&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;});&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this.dataGridTabContainer.addChild(cp1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;this.dataGridTabContainer.startup();&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 20:53:32 GMT</pubDate>
    <dc:creator>TimDietz</dc:creator>
    <dc:date>2022-10-04T20:53:32Z</dc:date>
    <item>
      <title>dgrid OnDemandGrid header and content columns not aligned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dgrid-ondemandgrid-header-and-content-columns-not/m-p/1218821#M78905</link>
      <description>&lt;P&gt;I have a dgrid (OnDemandGrid, DGridSelection) within a dijit ContentPane (within a BorderContainer) that displays over a map. The grid contains a header row (labels) and the content rows are data from a FeatureLayer. As the map is moved, the server is queried and the data updates and refreshes:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimDietz_0-1664914807769.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52860i5E21FBCDEC5AD79E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimDietz_0-1664914807769.png" alt="TimDietz_0-1664914807769.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note that despite the scrollbar, the header and content columns are aligned.&lt;/P&gt;&lt;P&gt;However, I now need to display two similar grids, so I've wrapped the ContentPane within a TabContainer. Everything functions as I need it to, except the content column widths no longer match the header column widths:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimDietz_1-1664915188086.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52862iAB510C6FBD9856AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimDietz_1-1664915188086.png" alt="TimDietz_1-1664915188086.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have use the debugger to modify the CSS in every way I can think of, but I've hit a wall.&amp;nbsp; If anyone has any advice, I'd really appreciate it.&lt;/P&gt;&lt;P&gt;(This is coded within a class method in TypeScript):&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;const DataGrid = declare([OnDemandGrid, DGridSelection]);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;private dataGrid: any;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;private dataGridTabContainer: TabContainer;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// columns and store are parameters passed to the method.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;columns: { field: string; label: string }[];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;store: Memory; // from 'dstore/Memory'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this.dataGrid = new DataGrid(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;columns,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;bufferRows: Infinity,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;selectionMode: 'single',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;collection: store,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;'dataGrid'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;this.dataGrid.startup();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this.dataGridTabContainer = new TabContainer({&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;style: "height: 100%; width: 100%;"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}, "dataGridTC");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;// Note only one tab for now to simplify troubleshooting.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;var cp1 = new ContentPane({&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;title: "Sites",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;content: this.dataGrid // Add the grid to the pane&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;});&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;this.dataGridTabContainer.addChild(cp1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;this.dataGridTabContainer.startup();&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 20:53:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dgrid-ondemandgrid-header-and-content-columns-not/m-p/1218821#M78905</guid>
      <dc:creator>TimDietz</dc:creator>
      <dc:date>2022-10-04T20:53:32Z</dc:date>
    </item>
  </channel>
</rss>

