-------------------------------------------------------------- CompanyID | BranchID | EmployeeID | EmployeeName -------------------------------------------------------------- 1 | 1 | 1 | Arvind | 1 | 1 | 2 | Ajay | 1 | 3 | 3 | Sonu | 1 | 2 | 4 | Vinod | 1 | 1 | 5 | Tarun | 1 | 2 | 6 | Uddhav | 2 | 2 | 7 | Ravi | 2 | 1 | 8 | Govinda | 2 | 2 | 9 | Robin | 2 | 2 | 10 | Anand |
var distinctCompanyIds = datatable.AsEnumerable() .Select(s=> new { id = s.Field<string>("CompanyId"), }) .Distinct().ToList();
distinctCompanyIds
GridViews
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)