Change DataGrid column header text

后端 未结 6 860
说谎
说谎 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-12 00:09

    Try HeaderText instead of Header like this :

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

提交回复
热议问题