Items collection must be empty before using ItemSource using custom list

后端 未结 2 1011
离开以前
离开以前 2021-01-20 16:06

In my class ResultEntity if I do:

_resultMulti = new List(); 

I see the following error message:

2条回答
  •  醉酒成梦
    2021-01-20 16:59

    Just wrap your column definitions with DataGrid.Columns. As you are binding it using ItemsSource you can't put any direct content in the definition. It is considering your columns as items of the grid which can't go with ItemsSource collection.

提交回复
热议问题