How to avoid duplicate values in a column? is there any built functionality or else must do iteration through rows.If so in which event i can write?
If I have understood well your question, I found a very simple validation with the following code in the BeforeRowUpdate event:
For i As Int32 = 1 To ugDef1.Rows.Count - 1 If e.Row.Cells(0).Value = ugDef1.Rows(i).Cells(0).Value Then e.Cancel = True : Exit Sub Next
I hope this will help you