Timeshell,

Not sure why you dug up this old post but your suggestion is incorrect. If the datagridview has been sorted (like by clicking a column header), it will produce the wrong value.