1. Fetch the First row id and last row id.
2. create Enumerable range
IEnumerable<int> nos= Enumerable.Range(firstrowid, lastrowid);
3. use linq to get missing nos.
var missingid = from a in nos
where !(from b in gvRows.AsEnumerable()
select b["id"])
.Contains(a)
select a;