Items collection must be empty before using ItemSource using custom list

后端 未结 2 978
离开以前
离开以前 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:37

    You are adding your DataGridTextColumns directly as items of the DataGrid, thus you are setting both the Items and ItemsSource property and you can only use one at the same time. Fix your columns configuration by using the Columns attached property:

    
                
        
        
        
    
    

提交回复
热议问题