<?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 Displaying results in datagrid, within a tabitem in ArcGIS Viewer for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/displaying-results-in-datagrid-within-a-tabitem/m-p/352968#M1048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've customized a layout to create a panel at the bottom (where the attribute grid would appear) and in that panel I have a TabControl with four TabItems.&amp;nbsp; In each tabItem is one DataGrid.&amp;nbsp; I then have a custom addin that runs a query, and should update each datagrid with results (as a list).&amp;nbsp; (One tab is for schedule, one is for followup, etc.)&amp;nbsp; The tool itself runs from the popup, using one of the attributes as a custom id to run the search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my problem - if I put all of the data grids in one stackpanel, no tabs, everything works perfectly.&amp;nbsp; But then it pretty much takes up the entire screen and just isn't feasible.&amp;nbsp; But if I keep it on the tabs, it will populate everything correctly the first time; but then the second time I run it, everything tanks.&amp;nbsp; I get the generic "object not referenced" error; it will populate the first grid, but nothing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the following code to access the element:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;MapApplication&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;.Current.FindObjectInLayout&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;"ShellDataGrid"&lt;/SPAN&gt;&lt;SPAN style="; font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt;) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="; font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;DataGrid&lt;/SPAN&gt;&lt;SPAN style="; font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt;; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: Consolas;"&gt;Then using ShellDataGrid.ItemsSource = lstShell; to populate the grids, but clearly this isn't working.&amp;nbsp; Does anyone have any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: Consolas;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2014 19:41:54 GMT</pubDate>
    <dc:creator>KarenEllett</dc:creator>
    <dc:date>2014-07-28T19:41:54Z</dc:date>
    <item>
      <title>Displaying results in datagrid, within a tabitem</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/displaying-results-in-datagrid-within-a-tabitem/m-p/352968#M1048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've customized a layout to create a panel at the bottom (where the attribute grid would appear) and in that panel I have a TabControl with four TabItems.&amp;nbsp; In each tabItem is one DataGrid.&amp;nbsp; I then have a custom addin that runs a query, and should update each datagrid with results (as a list).&amp;nbsp; (One tab is for schedule, one is for followup, etc.)&amp;nbsp; The tool itself runs from the popup, using one of the attributes as a custom id to run the search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my problem - if I put all of the data grids in one stackpanel, no tabs, everything works perfectly.&amp;nbsp; But then it pretty much takes up the entire screen and just isn't feasible.&amp;nbsp; But if I keep it on the tabs, it will populate everything correctly the first time; but then the second time I run it, everything tanks.&amp;nbsp; I get the generic "object not referenced" error; it will populate the first grid, but nothing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the following code to access the element:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;MapApplication&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;.Current.FindObjectInLayout&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;"ShellDataGrid"&lt;/SPAN&gt;&lt;SPAN style="; font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt;) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="; font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;DataGrid&lt;/SPAN&gt;&lt;SPAN style="; font-size: 10pt; font-family: Consolas;"&gt;&lt;STRONG&gt;; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: Consolas;"&gt;Then using ShellDataGrid.ItemsSource = lstShell; to populate the grids, but clearly this isn't working.&amp;nbsp; Does anyone have any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: Consolas;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 19:41:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-silverlight-questions/displaying-results-in-datagrid-within-a-tabitem/m-p/352968#M1048</guid>
      <dc:creator>KarenEllett</dc:creator>
      <dc:date>2014-07-28T19:41:54Z</dc:date>
    </item>
  </channel>
</rss>

