如何將複選框添加到數據表並將其綁定到數據網格?如何將複選框控件添加到數據表?
DataTable ColumnList = new DataTable();
ColumnList.Columns.Add("Column Fields");
int j = 1, i = 0;
CheckBox colCheckbox = new CheckBox();
foreach (Columns col in ColumnNames)
{
colCheckbox.Name = col.ColumnName;
ColumnList.Rows.Add(colCheckbox); // This is getting displayed as System.Windows.Forms.CheckBox,CheckState=0
}
請幫忙。
這是winforms嗎? WPF? asp.net? – 2011-04-12 05:56:21
它的窗體形式 – NewBie 2011-04-12 06:06:50
到目前爲止你有什麼? – 2011-04-12 06:10:17