TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Daniele De Marco
NA
1
3.6k
DataGridView and CheckBox
Sep 9 2010 4:23 AM
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?
Reply
Answers (
1
)
Displaying forms 2&3 from a combo box on form 1
The process cannot access the file