Change DataGrid column header text

后端 未结 6 864
说谎
说谎 2021-01-11 23:26

I have a list of a specific class type Person and I want to make a DataGrid with it.

private void DataGrid_Loaded(object sender, Ro         


        
6条回答
  •  情话喂你
    2021-01-11 23:59

    myDataGrid.Columns[0].Header="First Name";    
    myDataGrid.Columns[1].Header="Last Name";
    

    all them work for me but you have to put code after datagrid loaded

提交回复
热议问题