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 AvRank #4,868 · 321 reputationPosted Sep 7, 2016, 8:47 PM EDT
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));
}
}
}
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 7, 2016, 8:21 PM EDT
RajaRank #1,035 · 1.9K reputationPosted Sep 8, 2016, 3:00 AM EDT
Jisny Av