<?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: Dynamically created datagrid inside ExpandoPane sizing issues in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-created-datagrid-inside-expandopane/m-p/494303#M45932</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever get this solved?&amp;nbsp; I'm having similar issues with my DataGrid inside my ExpandoPane - where the sizing is not as expected.&amp;nbsp; Any insights you can provide might be helpful... thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2020 17:46:38 GMT</pubDate>
    <dc:creator>PeggyCorey</dc:creator>
    <dc:date>2020-08-28T17:46:38Z</dc:date>
    <item>
      <title>Dynamically created datagrid inside ExpandoPane sizing issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-created-datagrid-inside-expandopane/m-p/494302#M45931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, Here's what I have - I have a classic layout of expando panes.&amp;nbsp; Left with TOC, main with map and bottom with other stuff.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The bottom pane starts collapsed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use this for a datagrid showing results of a find task.&amp;nbsp; This datagrid will vary according to what layer is searched and is creadte fresh for each search. If a previous one exists it will be destroyed.&amp;nbsp; This is the code that does that bit&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var w = dijit.byId("gridx");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (w) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w.destroy();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //then we construct a new DOM node, gridx,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; require(["dojo/dom-construct"], function (domConstruct) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domConstruct.place(infotext, "xxx", "after");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //because we are using a DataGrid we need to run the dojo parser again to get the info on it
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //but just on the gridx object, totally re-ruunning it will fail as it will re-register existing items
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.parser.instantiate([dojo.byId("gridx")]);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then create the new datagrid here's the first line of that bit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; var infotext =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;table data-dojo-type='dojox.grid.DataGrid' style='width: 97%; height: 120px;' style='overflow:auto' data-dojo-id='gridx'&amp;nbsp; id='gridx' &amp;gt;&amp;lt;thead&amp;gt;&amp;lt;tr&amp;gt;";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then expand the expandopane&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!dijit.byId("footer")._showing) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("footer").toggle();


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the issue.&amp;nbsp; The first time I run this the style of the datagrid as set above is ignored, resulting in a much bigger grid, any scroll bars are well off the visible screen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Subsequent runs of this routine work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a dummy datagrid at the initial load that is the right size, but this doesn't do anything BUT, and this isn't 100%, if I expand the ExpandoPane straight after the initial load, with the dummy grid, that causes the size of the first real run to be correct.&amp;nbsp; It seems to me to do with the fact that the ExpandoPane is collapsed.&amp;nbsp; I have moved the expand routine to after I create the new datagrid&amp;nbsp; within it, but that fails to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've spent nearly a day playing around with this!&amp;nbsp; Any help would be much appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS as a work around I have set it so that as soon as the user starts the search process (hits a button and a dialog box appears for the parameters) this is when I expand the results pane.&amp;nbsp; If no results it collapses again.&amp;nbsp; This seems to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just noticed - once the datagrid is in the expandopane and correctly sized.&amp;nbsp; I collapse the pane, then uncollapse it and the grid has all gone silly again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what exactly happens to the contents of the pane when it collapses?&amp;nbsp; Do they all get a resize command?&amp;nbsp; Here's the before collapse generated HTML&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; &amp;lt;div hidefocus="hidefocus" role="grid" dojoattachevent="onmouseout:_mouseOut" tabindex="0" aria-multiselectable="true" class="dojoxGrid" id="gridx" align="left" widgetid="gridx" aria-readonly="true" aria-activedescendant="gridxHdr6" style="width: 97%; height: 120px;"&amp;gt;
.
.
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and after collapsing the expnadopane&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; &amp;lt;div hidefocus="hidefocus" role="grid" dojoattachevent="onmouseout:_mouseOut" tabindex="0" aria-multiselectable="true" class="dojoxGrid" id="gridx" align="left" widgetid="gridx" aria-readonly="true" style="width: 1680px; height: 18px;"&amp;gt;
.
.&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, even when hidden my data grid has been resized incorrectly!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 08:09:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-created-datagrid-inside-expandopane/m-p/494302#M45931</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2013-07-12T08:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created datagrid inside ExpandoPane sizing issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-created-datagrid-inside-expandopane/m-p/494303#M45932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever get this solved?&amp;nbsp; I'm having similar issues with my DataGrid inside my ExpandoPane - where the sizing is not as expected.&amp;nbsp; Any insights you can provide might be helpful... thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 17:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-created-datagrid-inside-expandopane/m-p/494303#M45932</guid>
      <dc:creator>PeggyCorey</dc:creator>
      <dc:date>2020-08-28T17:46:38Z</dc:date>
    </item>
  </channel>
</rss>

