I have 45 Columns and 30 rows in Data table. in First row second colum is item number(1 item number:)'1' is serial number and the values are continue from third row
(1 Item Number 1 5 6 8 9)upto 25 column. after the 25 th column another values are stored.like
(1 Itemnumber: 1 5 6 7 9 8 .......25 Description 36 96 96 96 58 87 98 .......)up to 45th column. now i want to check duplicate for item number.how to do it.

Jisny AvPosted Sep 8, 2016, 12:47 AM
for (int j = 0; j < dt.Columns.Count; j++)
{
string first = dt.Rows[i][j].ToString();
for (int k = j + 1; k < dt.Columns.Count; k++)
{
if (first == dt.Rows[i][k].ToString())
Response.Write(" The value " + first + " in the row " + (i + 1) + " column " + (j + 1) + " already exists in the column " + (k + 1));
}
}
}
RajaPosted Sep 8, 2016, 7:00 AM
Jisny Av
Rajeesh MenothPosted Sep 8, 2016, 12:21 AM