【发布时间】:2020-11-16 12:37:27
【问题描述】:
我有以下代码在 WPF GridView 控件中动态创建列,标题名称来自 string[],它存储在名为 data_org 的 List<string[]> 中
GridView gv = tabell.View as GridView;
foreach (string s in data_org.ElementAt(0))
{
gv.Columns.Add(new GridViewColumn { Header = s });
}
有没有办法在我创建列时添加数据?我已经在添加列语句中搜索了执行此操作的方法,但找不到方法。
gv.Columns.Add(new GridViewColumn{Header = s, **statement to add data to column**});
我的数据存储在另一个List<float[]> 中,其中每个项目float[] 代表一列。我是否也必须做一些事情来处理该数据类型 (float[])?
【问题讨论】: