<?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: Adding dgrids dynamically to a TabContainer with varying widths in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211787#M19585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my final project, I did include the DijitRegistry in the dGrid declaration.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 12:03:17 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2013-09-10T12:03:17Z</dc:date>
    <item>
      <title>Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211781#M19579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm rewriting an application I developed in Flex that allows a user to identify the features of all the visible layers and puts the result in a tab container, with each tab containing the results of each visible layer. This application can be viewed &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://ccma.nos.noaa.gov/explorer/sefcri/sefcri.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]25337[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've gotten the new application to the point where I have populated the tab containers with the grids, but some of the grids are not showing all the fields. The issue is that there are varying number of fields to be shown...from two to 100. However, all the grids are the same width, so the grid for layer 224 is only showing 7 of the 97 fields. I've created a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/kenbuja/GW7XK/" rel="nofollow" target="_blank"&gt;Fiddle&lt;/A&gt;&lt;SPAN&gt; that shows this issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what it's looking like now in JavaScript&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]25340[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A couple of things with the Fiddle. It isn't rendering the tabs correctly, but clicking on the numbers at top will show the different tabs. Also, the CSS section contains a couple of different files merged together, but the styles for the dgrid that I'm using are at the bottom of the list, setting the default size of the dgrid and the width of the fields (50px for all except the OJBECTID field).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, the Fiddle should be showing one other issue I'm having with the dgrid. Sometimes the first row of the data overlaps the header. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]25341[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 15:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211781#M19579</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-06-18T15:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211782#M19580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: kenbuja&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured out how to accomplish this by using the addCssRule method to dynamically size the grids.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dataGrid.addCssRule("#" + dataGrid.id, "width: " + newsize + "px");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have updated the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/kenbuja/GW7XK/5/" rel="nofollow" target="_blank"&gt;Fiddle&lt;/A&gt;&lt;SPAN&gt; to show this, although it's still sometimes shoving the grid content into the header.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 19:20:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211782#M19580</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-25T19:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211783#M19581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Even though you've marked this thread as answered, I'm not sure you've fixed your dgrid header issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/SitePen/dgrid/issues/285#issuecomment-8655324" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/SitePen/dgrid/issues/285#issuecomment-8655324&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/SitePen/dgrid/issues/249" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/SitePen/dgrid/issues/249&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What it comes down to is you are probably starting up your grid(s) at the wrong time (usually too early).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could start them up after manually calling the parser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
require([ "dojo/ready","dojo/parser"], function (ready, parser){
 // Other Code
 parser.parse();
 ready(function (){
&amp;nbsp; // dataStore = new Memory ({data});
&amp;nbsp; yourGrid.set("store", dataStore );
&amp;nbsp; yourGrid.startup();
&amp;nbsp; // Other Code
 });
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are other valid options listed in the two threads I linked above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:25:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211783#M19581</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2021-12-11T10:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211784#M19582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: kenbuja&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm still having an intermittent problem with the grid content overlapping the header. I have tried the adding the resize into the onShow event, but that doesn't make a difference either. I've discovered that since the grid has the ColumnHider extension, if I change the visibility of one of the columns, the content no longer overlaps the header.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 17:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211784#M19582</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-30T17:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211785#M19583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to solve the content/header overlap by firing the "datagrid.renderArray(data)" command after adding the dgrid to the ContentPane and firing "cp.startup". This &lt;/SPAN&gt;&lt;A href="http://jsfiddle.net/GW7XK/6/"&gt;version&lt;/A&gt;&lt;SPAN&gt; of the Fiddle shows the correct syntax.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 19:05:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211785#M19583</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-09-09T19:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211786#M19584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: gsimpson4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It might also help to add DijitRegistry to your declare:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var dataGrid = new(declare([Grid, Selection, ColumnHider,DijitRegistry]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also add this to your require:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; "dgrid/extensions/DijitRegistry"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 23:44:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211786#M19584</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-09-09T23:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211787#M19585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my final project, I did include the DijitRegistry in the dGrid declaration.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 12:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211787#M19585</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2013-09-10T12:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dgrids dynamically to a TabContainer with varying widths</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211788#M19586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: kenburcham&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh man, this is so great to know.&amp;nbsp; I ended up doing css things because I couldn't figure it out.&amp;nbsp; Nice!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-dgrids-dynamically-to-a-tabcontainer-with/m-p/211788#M19586</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-09-10T14:04:44Z</dc:date>
    </item>
  </channel>
</rss>

