I've a datatable bound to a gridview.
The datatable has the following data:
JobID Site Job List
--------- --------- --------- ---------
134 A job1 26
2241 A job2 25
124 A job3 26
244 B job1 12
154 B ads2 46
Am trying to take the count of distinct sites. So I write the following function:
public void CreateAdmins(DataTable JobsToStart)
{
DataView uniqueDialers = new DataView(JobsToStart);
uniqueDialers = uniqueDialers.ToTable(true, "Site").DefaultView;
Debug.Print(uniqueDialers.Rows.Count);
}
After executing the above function the data which is displayed in the datagridview changes. How do I avoid this?