protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//assuming the value you want to format is in cell 0
string fomattedText = string.Format("{0:N2}", e.Row.Cells[0].Text);
e.Row.Cells[0].Text = fomattedText;
}
}
|