2013-12-19 77 views

回答

2

使用DataGrid.Columns:

dataGrid.Columns[0].Header = "New Header for column 0"; 
1

您可以更改數據網格的頭在Page_Load

dataGrid.HeaderRow.Cells[0].Text = "Any thing that you want to Enter"; 
+1

這個問題是關於WPF ['DataGrid'](http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid(v = vs.110).aspx) –

3

我會用你綁定的物品類別的DisplayName如下面

public class YourItemClass 
{ 
    [DisplayName("Column Name")] 
    public string SomeProperty{ get; set; } 
} 
相關問題