Use this code
--------------------------------------------------------------------------------------
private void AddNewRowToGrid()
{
if (ViewState["CurrentTable"] != null)
{
DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];
DataRow drCurrentRow = null;
drCurrentRow = dtCurrentTable.NewRow();
drCurrentRow["SlNo"] = dtCurrentTable.Rows.Count + 1;
drCurrentRow["ReceiptNo"] = txtRcptHdNo.Text;
drCurrentRow["ItemName"] = ddlRcptDtlsItem.SelectedItem.Text;
drCurrentRow["UOM"] = txtRcptDtlsUOM.Text;
drCurrentRow["Description"] = txtRcptDtlsDescr.Text;
drCurrentRow["Rate"] = txtRcptDtlsRt.Text;
drCurrentRow["Quatity"] = txtRcptDtlsQty.Text;
drCurrentRow["Amount"] = txtRcptDtlsAmount.Text;
dtCurrentTable.Rows.Add(drCurrentRow);
ViewState["CurrentTable"] = dtCurrentTable;
dgvRcptDtls.DataSource = dtCurrentTable;
dgvRcptDtls.DataBind();
}
else
{
Response.Write("ViewState is null");
}
SetPreviousData();
}