c# - "'EditItem' is not allowed for this view" while I am using ExpandoObject as the row of datagrid in WPF -


I am trying to use expandoObject as a line for the datagrid in WPF I am

And I think that until the cell is not edited it works fine.

Here is the core code:

  ExpandoObject line = new ExpandoObject (); ((Id works & lt; string, object & gt;) line). Add (strale column, strue); Dg.Items [0] = Row;   

The datagrid can display the line correctly, but if I click on the cell to edit it, then I get the error

'EditItem' is not allowed for this view "will be displayed .

¼ ?? I know what's wrong with it. We should use it: dg.ItemSources = new dynamic [] {expandoObject}

And it works now!

What a stupid boy!

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -