Changing the FormattedValue of a DataGridViewCell

Changing the FormattedValue of a DataGridViewCell

Post by dW5jYWdlZ » Fri, 07 Apr 2006 23:15:02


I've got a DataGridView with a DataTable as its DataSource. After the user
edits a cell, I'd like to be able to change that cell. For example, suppose
I have a column for a phone number. I want the user to be able to type
1231231234, and after I validate it, I'd like to be able to change the
displayed contents of that cell to (123) 123-1234. How can I accomplish this?