最初の列がテキストボックスセルで、残りがチェックボックスである6列があります。二次元配列の値をデータグリッドに入れたいです。
string[,] debugger={{"name","0","0","1","1","0"}};
0=false 1=true (datagridview プロパティ ウィンドウから false 値と true 値を割り当てました。これを試すと、フォーマット例外が発生しますか?
grdFont.ColumnCount=6;
var row = new DataGridViewRow();
row.Cells.Add(new DataGridViewTextBoxCell()
{
Value = debugger[0]
});
row.Cells.Add(new DataGridViewCheckBoxCell()
{
Value = debugger[1]
});
row.Cells.Add(new DataGridViewCheckBoxCell()
{
Value = debugger[2]
});
row.Cells.Add(new DataGridViewCheckBoxCell()
{
Value = debugger[3]
});
row.Cells.Add(new DataGridViewCheckBoxCell()
{
Value = debugger[4]
});
row.Cells.Add(new DataGridViewCheckBoxCell()
{
Value = debugger[5]
});
grdFont.Rows.Add(row);
これを実装できる別の方法はありますか?