01.
DataGridViewTextBoxColumn column;
02.
DataGridViewCheckBoxColumn columnchk;
03.
04.
column =
new
DataGridViewTextBoxColumn();
05.
column.DataPropertyName =
"menuname"
;
06.
column.HeaderText = nMenuname;
07.
column.Width = 95;
08.
this
.dataGridView1.Columns.Add(column);
09.
10.
columnchk =
new
DataGridViewCheckBoxColumn();
11.
columnchk.DataPropertyName =
"viewdata"
;
12.
columnchk.HeaderText = nView;
13.
columnchk.Width = 85;
14.
this
.dataGridView1.Columns.Add(columnchk);
15.
16.
columnchk =
new
DataGridViewCheckBoxColumn();
17.
columnchk.DataPropertyName =
"writedata"
;
18.
columnchk.HeaderText = nWrite;
19.
columnchk.Width = 85;
20.
this
.dataGridView1.Columns.Add(columnchk);
21.
22.
columnchk =
new
DataGridViewCheckBoxColumn();
23.
columnchk.DataPropertyName =
"editdata"
;
24.
columnchk.HeaderText = nEdit;
25.
columnchk.Width = 85;
26.
this
.dataGridView1.Columns.Add(columnchk);
27.
28.
columnchk =
new
DataGridViewCheckBoxColumn();
29.
columnchk.DataPropertyName =
"deldata"
;
30.
columnchk.HeaderText = nDel;
31.
columnchk.Width = 85;
32.
this
.dataGridView1.Columns.Add(columnchk);