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

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

Simple file compression in C -

php - Sorting an multidimension array using usort fails -