private DataTable CategoryNames(DataTable myTable)
{
DataTable dt = new DataTable();
dt.Columns.Add("ColumnName");
foreach (DataRow row in myTable.Rows)
{
string s = row["ColumnName"].ToString();
DataRow[] drx = dt.Select("ColumnName= '" + s + "'");
if (drx.Length == 0)
{
dt.Rows.Add(new object[] { s });
}
}
return dt;
}
serkan sendur 821 Postaholic Banned Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.