int countDiffHallId = dgvEachHallOrGarden.Rows .Cast<DataGridViewRow>() .Select(r => (int)r.Cells["clientId"].Value) .Distinct() .Count();
clientId
int
(int)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)