<?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 Print to csv from a tab in AT programmatically. in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/print-to-csv-from-a-tab-in-at-programmatically/m-p/876303#M13587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the exportToCSV function to export to csv from a tab that is not clicked on. I used the function tabChanged to change the active tab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;this.tabContainer.selectChild(page);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.tabChanged();&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I verified that the active tab has indeed changed by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; var params = this.tabContainer.selectedChildWidget.params;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(params.title);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, when the call is made to &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;table.exportToCSV(params.title);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error that on the _FeatureTable.js the &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; } else if (this.grid.store instanceof Memory) {&lt;/PRE&gt;&lt;P&gt;this.grid is null!&lt;/P&gt;&lt;P&gt;how can I simulate a click on a tab or update the grid with another tab's grid content?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:59:16 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2021-12-12T10:59:16Z</dc:date>
    <item>
      <title>Print to csv from a tab in AT programmatically.</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/print-to-csv-from-a-tab-in-at-programmatically/m-p/876303#M13587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the exportToCSV function to export to csv from a tab that is not clicked on. I used the function tabChanged to change the active tab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;this.tabContainer.selectChild(page);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.tabChanged();&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I verified that the active tab has indeed changed by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; var params = this.tabContainer.selectedChildWidget.params;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(params.title);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, when the call is made to &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;table.exportToCSV(params.title);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error that on the _FeatureTable.js the &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; } else if (this.grid.store instanceof Memory) {&lt;/PRE&gt;&lt;P&gt;this.grid is null!&lt;/P&gt;&lt;P&gt;how can I simulate a click on a tab or update the grid with another tab's grid content?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:59:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/print-to-csv-from-a-tab-in-at-programmatically/m-p/876303#M13587</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-12-12T10:59:16Z</dc:date>
    </item>
  </channel>
</rss>

