Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Recursive call to Automation Peer API is not valid
    primarykey
    data
    text
    <p>I am receiving an error message "Recursive call to Automation Peer API is not valid" when loading a datagrid with a datatemplatecolumn containing a combobox column. The error ends up caught in our unhandled exception code. This seems to be an issue on my machine, and google has provided no source of guidance on resolving the issue. The issue appears to only occur when I am populating the comboboxes with data. Populating the comboboxes (if I do not load data) works correctly, and while the error is displayed I am able to see the data properly retrieved in the background. </p> <p>I am using a WPF datagrid where I'm using a DataGridTemplateColumn for adding a combobox inside the grid. I have the drop down list bound to an enum using an objectdataprovider. In the code behind when initializing my screen I use a Linq2Sql statement to retrieve data and populate the Itemssource of the grid.</p> <pre><code>&lt;grid:DataGrid.Resources&gt; &lt;ObjectDataProvider x:Key="ChangeTypeData" MethodName="GetValues" ObjectType="{x:Type System:Enum}"&gt; &lt;ObjectDataProvider.MethodParameters&gt; &lt;x:Type TypeName="namespace:ChangeType" /&gt; &lt;/ObjectDataProvider.MethodParameters&gt; &lt;/ObjectDataProvider&gt; &lt;/grid:DataGrid.Resources&gt; &lt;grid:DataGrid.Columns&gt; &lt;grid:DataGridTextColumn Binding="{Binding DatapointName}" Header="Datapoint Changed" IsReadOnly="True" Width="Auto" /&gt; &lt;grid:DataGridTemplateColumn Header="Change Type"&gt; &lt;grid:DataGridTemplateColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;ComboBox Text="{Binding Path=ChangeTypeName}" ItemsSource="{Binding Source={StaticResource ChangeTypeData}}" Name="dgcboChangeType" SelectionChanged="dgcboChangeType_SelectionChanged"/&gt; &lt;/DataTemplate&gt; &lt;/grid:DataGridTemplateColumn.CellTemplate&gt; </code></pre> <p> </p> <p>Any and all guidance on solving this issue is appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload