如何以编程方式访问ASP.NET ListView标头?

时间:2010-07-12 10:11:28

标签: c#

我有一个ListView。如何以编程方式访问ListView标头?

1 个答案:

答案 0 :(得分:3)

在WPF中:

var gridView = listView.View as GridView;
gridView.Columns[0].Header = "MyCustomHeader"; //setting header to the first column

MSDN上的更多信息ListView.View propertyGridView classGridView.Columns property