Clear datagrid values in wpf

后端 未结 7 1448
粉色の甜心
粉色の甜心 2021-01-11 19:14

I need to flush my datagrid everytime when a treeviewitem is clicked. My code is given below.

private void treeView1_SelectedItemCh         


        
相关标签:
7条回答
  • 2021-01-11 20:13

    I was able to clear my Data-Grid by setting the DataContext to null.

    DataGrid.DataContext=null;
    
    0 讨论(0)
提交回复
热议问题