Code Snippet
private void DgvCellStyle_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("a");
dt.Rows.Add(155.6565);
dt.Rows.Add(2342.2);
this.dataGridView1.DataSource = dt;
this.dataGridView1.CellFormatting += new DataGridViewCellFormattingEventHandler(dataGridView1_CellFormatting);
}
void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 0 && e.RowIndex != this.dataGridView1.NewRowIndex)
{
double d = double.Parse(e.Value.ToString());
e.Value = d.ToString("N2");
}
}