I want detect duplicate row for certain column in datagridview and highlight the row.

Recommended Answers

All 3 Replies

Hello, lianpiau.
What if you find 2 duplicates (with a different content) for single column? Say,
Column1 Column2
r1 text text1
r2 text text2
r3 text3 text4
r4 text3 text5

What rows should be highlighted?

Also, here's a post with a similar question: How to check duplicate data in datagridview (Well, there still remains a little bit of work to make it act as you want :))

for example, i have 2 records, this 2 record have same [AutoNumber], if [AutoNumber] is same, then highlight row.

Yes, this is what was on your screenshot. I was asking, what if you have 2 different pairs of duplicates (see my example)?

Anyways, I gave you a link .. have you checked it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.