try like this
if (e.Row.RowType == DataControlRowType.Footer)
{
DataTable dt = GridView1.DataSource as DataTable;
int RENT = 0;
int AMOUNTLEFT = 0;
int AMOUNTPAID = 0;
for (int i = 0; i < dt.Rows.Count; i++)
{
RENT += Convert.ToInt32(dt.Rows[i]["RentColumnName"]);
AMOUNTLEFT += Convert.ToInt32(dt.Rows[i]["AMOUNTLEFTColumnName"]);
AMOUNTPAID += Convert.ToInt32(dt.Rows[i]["AMOUNTPAIDColumnName"]);
}
e.Row.Cells[14].Text = "Grand Total المجموع :-";
e.Row.Cells[14].Font.Bold = true;
e.Row.Cells[16].Text = AMOUNTPAID.ToString();
e.Row.Cells[16].Font.Bold = true;
e.Row.Cells[17].Text = RENT.ToString();
e.Row.Cells[17].Font.Bold = true;
e.Row.Cells[15].Text = AMOUNTLEFT.ToString();
e.Row.Cells[15].Font.Bold = true;
}