Wrong in for (int i = 0; i < gvLeaveTypes.Columns.Count - 2; i++) Make it as below. for (int i = 0; i < gvLeaveTypes.Columns.Count - 1; i++)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)