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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -