I have two forms in my project. They are named "Criteria" and "Screen". The Criteria form contains DataGridViewCriteria. The Screen form contains DataGridViewScreen.
DataGridViewCriteria's first column is a CheckBoxColumn. DataGridViewCriteria's second column contains a description specific to each row. I need to loop through the CheckBoxColumn and for each CheckBox that is checked I need to add a DataColumn to DataGridViewScreen. I need the title of each DataColumn added to DataGridViewScreen to equal the description that is adjacent its respective CheckBox on DataGridViewCriteria.
My code so far is:
Any suggestions?
Thank you very much!
DataGridViewCriteria's first column is a CheckBoxColumn. DataGridViewCriteria's second column contains a description specific to each row. I need to loop through the CheckBoxColumn and for each CheckBox that is checked I need to add a DataColumn to DataGridViewScreen. I need the title of each DataColumn added to DataGridViewScreen to equal the description that is adjacent its respective CheckBox on DataGridViewCriteria.
My code so far is:
Code:
For Each row As DataGridViewRow In Criteria.DataGridViewCriteria.Rows
If row.Cells(1).Value = True Then
Dim col As New DataColumn(row.Cells(1).Value, Type.GetType("System.String"))
dt.Columns.Add(row.Cells(1).Value)
End If
NextThank you very much!