Hi Frnz,
I have 2 datsets named ds and ds1 and merged that datasets into a single table named dt. Now, i want to compare the first dataset row value with second dataset column values For Ex: 1 dataset row contains the value as "SriDevi" means, i want to compare and find how many times the value "SriDevi" appears in second dataset columns and count the appearance. And give the answer as the "count". The answer is displayed in First Dataset. How?
Anyone please help me!!!!
Code:
Thanks,
Sri Devi S
I have 2 datsets named ds and ds1 and merged that datasets into a single table named dt. Now, i want to compare the first dataset row value with second dataset column values For Ex: 1 dataset row contains the value as "SriDevi" means, i want to compare and find how many times the value "SriDevi" appears in second dataset columns and count the appearance. And give the answer as the "count". The answer is displayed in First Dataset. How?
Anyone please help me!!!!
Code:
Code:
int rowcount;
DataRow dr = dt.Rows[0];
for (int j = 1; j < dt.Rows.Count; j++)
{
if (ds.Tables[0].Rows[0][1].ToString() == ds1.Tables[0].Rows[j][4].ToString())
{
rowcount = ds1.Tables[0].Rows.Count;
dr["Attendees"] = rowcount;
}
}
Sri Devi S
Comment