1.The error is generated by the
int.Parse()
call that is trying to covert to integer an invalid value (maybe is empty string or other string but must be an integer value like "1001");
2.You should debug that line of code and check the value from
row.Cells[0]
, and if is not OK, you should also check the Page_Load method where you bind your grid with data, and be shore that the init is done only once, and not for each postback!
For details see my next answer:
System.FormatException: Input string was not in a correct format. | Server Error in '/' Application[
^]