protected void grdViewItem_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//totalbill += Convert.ToDecimal(e.Row.Cells[5].Text);
//totalbill += Convert.ToDecimal((Label)e.Row.FindControl("lbltotal"));
}
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[4].Text = "Total Amount";
System.Globalization.CultureInfo info = System.Globalization.CultureInfo.GetCultureInfo("hi-IN");
e.Row.Cells[5].Text = totalbill.ToString("c",info);
}
}


Narasimha Reddy ChennupalliRank #1,163 · 1.6K reputationPosted Aug 10, 2015, 10:34 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 8, 2015, 11:41 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 9, 2015, 9:18 PM EDT
if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
{
MessageBox.Show(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
}