Hi all,
I'm using a datagrid for the first time and I am running into some
problems that I hope someone can help me with. I have a datagrid with
18 rows and 5 columns....column 1 is just text and columns
2-5 are checkboxes. Some of the checkboxes have to be invisible, and
in some cases some of the checkboxes have be be enabled=false. I have
it now so that the entire grid is populated correctly, but I am having
an extremely difficult time figuring out how to do the hiding and
disabling of the checkboxes! I will post the code I am using to
populate the datagrid, and if someone could please help me out by
posting code to hide and disable a checkbox (or even the whole cell) i
would be very grateful. Thank you so much in advance for your help!!!
(dgPermissions is the name of my DataGrid)
Dim dtPermissions As New DataTable("Permissions")
dtPermissions.Columns.Add("Item",
System.Type.GetType("System.String"))
For i = 1 To iNbrCols
dtPermissions.Columns.Add("ColumnName",
System.Type.GetType("System.Boolean"))
Next i
For J = 1 To iNbrRows
dgPermissions.RowTemplate.Height = 18
dgPermissions.RowTemplate.Resizable =
DataGridViewTriState.False
dtPermissions.Rows.Add(New Object() {"Text", False, False,
False, False})
dtPermissions.AcceptChanges()
Next J
dgPermissions.DataSource = dtPermissions