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
Mohammad Imran
NA
40
10.1k
Cell color not changing based on condition..
Aug 22 2017 12:48 AM
Below code is not working.not changing color.. data type is datetime..
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 6)
{
var mydatetime = DateTime.Parse(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
if (mydatetime.Hour > 9 && mydatetime.Minute > 30)
{
e.CellStyle.BackColor = Color.Yellow;
}
}
}
Reply
Answers (
7
)
Check 3D rectangle intersection
add value on 0th index when combo box is binded with db