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
Gillan Pansegrauw
NA
5
3.8k
Compare cells in 2 datagridviews
Mar 28 2018 4:26 AM
Hi guys,
I have 2 datagridviews(dgv1 & dgv2) populated with rows with the same columns.
I want to have the row from dgv2 cycle through dgv1 and if a cell is more than that of the row in dgv2 I want to color the background of the cell to mark that it exceeded.
I did get it to work by using foreach and while, but it takes sooooo long to process. Any way I can compare cells that might be quicker. Because atm isong once cell at a time scrolling through all 100 dgv1 rows and then moving to the next cell is taking a long time and I'm sure im beign inneficient.
while
(currentCell < (colCount + 1))
{
foreach
(DataGridViewRow rTestData
in
dgvSampleTestData.Rows)
{
//Test and chenge backgroun color
}
currentCell++;
}
Reply
Answers (
1
)
Connect client server using LAN Cable(Cross cable)
about wpf and xamal(icommand interface)