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
ic ic
NA
85
0
DatagridView Disable a Checkbox with a Tick In
Sep 30 2009 6:40 AM
Hi,
I can't seem to make a disabled checkbox in a datagridview with a tick in where the user can't select & stores a value of 0
I got this off the net but it shows a disabled box with no tick in and no value sored in the background as well even more dissapointing
once the mouseover or mousemove between rows the so called disabled checkbox chnages to enable or state.
On the CellPainting Event:
e.PaintBackground(e.CellBounds, true);
Rectangle r = e.CellBounds;
r.Width = 15;
r.Height = 15;
r.X += e.CellBounds.Width / 2 - 8;
r.Y += e.CellBounds.Height / 2 - 8;
ControlPaint.DrawCheckBox(e.Graphics, r, ButtonState.Flat);
e.Handled = true;
Is there no other way?
Please Assist, Regards
Reply
Answers (
8
)
How to Ignor Sunday and Saturdays on a DateTime Picker?
how to print row number in row header of a datagrid