0
我遇到了一個問題:如果列標題的名稱中有一個點,它不會顯示此列中單元格的值。顯示問題datagrid
我該如何解決此問題而不更改列的名稱?
var ds = new DataSet();
var dataPylons = new DataTable();
ds.Tables.Add(dataPylons);
foreach (var i in pylonItem)
{
cl = new DataColumn(i.Code + "\n" + i.Sheme, typeof(string));
dataPylons.Columns.Add(cl);
}
// In the cycle fill cell
dataPylons.Rows[i][j] =...;
...
DataGridPylons.ItemsSource = ds.Tables[0].DefaultView;
實例錯誤: https://docs.google.com/file/d/0B3wJRn2hp50hTm9uX2FkRUg1dTQ/edit?usp=sharing
我完全不鼓勵在WPF客戶端使用'System.Data'類。改爲創建適當的數據模型。 – 2013-04-22 20:48:42
如何正確生成表格的內容? – user2308845 2013-04-22 20:55:51