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. In each tabItem is one DataGrid. I then have a custom addin that runs a query, and should update each datagrid with results (as a list). (One tab is for schedule, one is for followup, etc.) The tool itself runs from the popup, using one of the attributes as a custom id to run the search.
Here's my problem - if I put all of the data grids in one stackpanel, no tabs, everything works perfectly. But then it pretty much takes up the entire screen and just isn't feasible. 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. I get the generic "object not referenced" error; it will populate the first grid, but nothing else.
I'm using the following code to access the element:
MapApplication.Current.FindObjectInLayout("ShellDataGrid") as DataGrid;
Then using ShellDataGrid.ItemsSource = lstShell; to populate the grids, but clearly this isn't working. Does anyone have any ideas?
Thanks!