In data table In three rows value given below
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
I will check duplicate value occur. like if 2 is occur in two times show the validation message.like Duplicate value occured.
if (ds.Tables[s].Rows[0][i].ToString().Trim() == "")
{
dt.Rows.Add();
dt.Rows[mn][0] = "Tag Number Should Be Mandatory" +ds.Tables[s].TableName;
}
Above code i will check if the empty filed occur in table show the mandatory message.Now i want to validate duplicate value occur.