That is because of the following line.
Label id = (Label)grddata.Rows[0].FindControl("lblid.text");
It should be.
Label id = (Label)grddata.Rows[0].FindControl("lblid");
Bit this "id" is never used in that function. So, no need to read it either.
Label id = (Label)grddata.Rows[0].FindControl("lblid.text");
One more thing, you are always reading the name from
Row[0]
, which is not the correct way.
You should read the name from the Row, which is being deleted using
e.RowIndex
, already suggested by
zahid.