For this project, my client asked me if he could select seven names from the list (which is a DataGridView) and use them in a single, separate form. The solution that came to my mind is to use the CheckBoxColumn for this matter. My problem is I have never used this kind of column (I have tried the ComboBoxColumn before but failed because the solutions I find are either too complicated for my knowledge or does not work), so I want to learn how to use this CheckBox type of column in DataGridView. Can anybody teach me about this matter? Any help will be greatly appreciated. Thanks in advance :)
airhalynn101
0
Light Poster
Recommended Answers
Jump to PostThe checkboxcolumn is rather straightforward. I'm not sure that is your problem. Is your datagridview bound? If so you need to bind the CheckBoxColumn to a boolean variable. Otherwise if you can see in the cell's value property if the checkbox was checked or not.
Let us know if this …
Jump to PostTo be honest, I'm a little puzzled by your
me.close
statement but other than that I understand that What you're describing here is what happens when the user doubleclicks on the dgv. The values on the row where the doubleclick happened get passed to the other form.You might want …
Jump to PostI put Me.Close so that after double-clicking on a cell, the form closes immediately.
But you said the user can have 7 liens no?
how does the checkbox column here affect the boolean variable
as long as you do not set
DataGridView1.Rows(e.RowIndex).Cells(7).Value = true
your database …
All 12 Replies
PerplexedB
2
Newbie Poster
airhalynn101
0
Light Poster
PerplexedB
2
Newbie Poster
airhalynn101
0
Light Poster
PerplexedB
2
Newbie Poster
airhalynn101
0
Light Poster
airhalynn101
0
Light Poster
airhalynn101
0
Light Poster
airhalynn101
0
Light Poster
airhalynn101
0
Light Poster
PerplexedB
2
Newbie Poster
airhalynn101
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.