Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
DataGridView and CheckBox
Daniele De Marco
Sep 9 2010 4:23 AM
3.2k
Reply
I am writing a C# method that reads and shows an XML file into a datagridview. The datagridview's got a checkbox column
(DataGridViewCheckBoxColumn) that should be checked if an attribute of the XML nodes is true. I don't know how to check the box unfortunately, I tryed a lot of solutions like:
dataGridView1.Rows[i].Cells["Column1"].Value = 1; //Column1 is the DataGridViewCheckBoxColumn
dataGridView1.Rows[i].Cells["Column1"].Value = true; //Column1 is the DataGridViewCheckBoxColumn
I also tryed to set TrueValue and FalseValue in this way:
Column1.TrueValue = 1;
Column1.FalseValue = 0;
As you can guess, no luck with that. I mean the Value property actually works but when I start the Form, the checkbox is not checked like it should be.
What can I do?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Displaying forms 2&3 from a combo box on form 1
The process cannot access the file