---
title: "how to find duplicate values in devexpress gridview"  
description: "how to find duplicate values in devexpress gridview"  
author: "Demir ACAR"  
published: 2015-10-09  
updated: 2015-10-10  
canonical: https://www.mindstick.com/forum/33504/how-to-find-duplicate-values-in-devexpress-gridview  
category: "c#"  
tags: ["devexpress windows ui"]  
reading_time: 1 minute  

---

# how to find duplicate values in devexpress gridview

hi guys ;

I have [country](https://yourviews.mindstick.com/view/85543/do-you-think-that-french-will-be-islamic-country) [column](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server) and I wanna [check](https://yourviews.mindstick.com/story/2248/never-forget-to-check-these-specifications-before-buying-a-mobile-phone) it for [duplicate](https://www.mindstick.com/forum/160911/sql-query-to-find-duplicate-records-in-a-table-in-sql-server) record

thank in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams) .

## Replies

### Reply by Demir ACAR

I applied

\

```
Private void gridView1_CellValueChanging(object sender, CellValueChangedEventArgs e) {    object value = gridView1.GetRowCellValue(e.RowHandle, e.Column);}Buton Click Code like Belowif(value=Duplicate){MessageBox("Duplicate Record Found");}else{//Something Do}
```

how to use your's code on buton_click event .

### Reply by Sunil Singh

Hello,\
\
To obtain an old cell's value, call the GridView.GetRowCellValue method in the GridView.CellValueChanging event handler:\
\
[C#]Open in popup window\
void gridView1_CellValueChanging(object sender, CellValueChangedEventArgs e) {\
object value = gridView1.GetRowCellValue(e.RowHandle, e.Column);\
}\
\
[VB.NET]Open in popup window\
Private Sub gridView1_CellValueChanging(ByVal sender As Object, ByVal e As CellValueChangedEventArgs)\
Object value v = gridView1.GetRowCellValue(e.RowHandle, e.Column)\
End Sub\
\
A new value is available in the e.Value parameter.\
\
Let me know if this solution meets your requirements.


---

Original Source: https://www.mindstick.com/forum/33504/how-to-find-duplicate-values-in-devexpress-gridview

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
