Formating text in a datagridview

How do i convert the text of a cell in the datagridview to uppercase before i save it to the database?
[102 byte] By [Newbie77] at [2007-12-25]
# 1

are you using a DataAdapter to update the database?

Generally you would simply get and set the value of the cell and use the ToUpperCase() in the string class to make the text/string uppercase, however this is untested:

this.theDataGridView.Rows[RowIndex].Cells[CellIndex].Value = this.theDataGridView.Rows[RowIndex].Cells[CellIndex].Value.ToString().ToUpperCase();

does this work?

ahmedilyas at 2007-9-3 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
That worked great, thanks very much.

Cheers

Newbie77 at 2007-9-3 > top of Msdn Tech,Visual C#,Visual C# General...