protected void GrdIStatus_RowDeleting(object sender, GridViewDeleteEventArgs e) { objITypeM.ITM_ID = Convert.ToInt32(((Label)GrdIStatus.Rows[e.RowIndex].FindControl("lblITM_ID")).Text); objITypeM.ITM_Name = ((Label)GrdIStatus.Rows[e.RowIndex].FindControl("lblITM_Name")).Text; objITypeM.IsActive = Convert.ToBoolean(false); objITypeM.IsDeleted = Convert.ToBoolean(true); try { objITypeM.SaveTypeMaster(); MessageBox("Your record is Deleted"); BindData(); PnlITDetails.Visible = true; PnlITAdd.Visible = false; } catch { } }