プログラムで aList<List<string>>
を aにバインドしようとしています。可変数の列が必要なため、DataGrid
これを使用しています。List<List<string>>
DataGrid
実際には、 を にバインドするDataGrid
必要string[][]
がありますが、このデータ構造を取得して行を追加する必要があるため、部分的に役立ちますList<List<string>>
。
現在、このスニペットを使用して列を生成しています。
dgResults.Columns.Clear();
for (int i = 0; i < numColumns; i++)
{
DataGridTextColumn textColumn = new DataGridTextColumn();
textColumn.Binding = new Binding(string.Format("[{0}]", i));
dgResults.Columns.Add(textColumn);
}
textColumn.Binding
にバインドするには何を使用すればよいList<list<string>>
ですか?