how to find duplicate values in devexpress gridview

Total Post:11

Points:77
C#
 7958  View(s)
Ratings:
Rate this:

hi guys ;

I have country column and I wanna check it for duplicate record

thank in advance .

  1. Post:45

    Points:323
    Re: how to find duplicate values in devexpress gridview

    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.

  1. Post:11

    Points:77
    Re: how to find duplicate values in devexpress gridview

    I applied


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

    how to use your's code on buton_click event .

      Modified On Apr-10-2018 04:36:43 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!