I have a Datagridview
that allows user to input the prices of a product. My client wants it that if I enter 2.525 in the price, it will display 2.52 and when I focus or edit the cell it should display the full vale of 2.525.
I am using this code in formatting the Datagridview
Columns but this one is rounding off the entered value and it does not display the whole value when the cell is in editing mode because i am using C2.
CustInvLines.Columns["InvLinePrice"].DefaultCellStyle.Format = C2
How will I format the cell so that it will display the whole value entered by user in edit mode and It will only display 2 decimal places after editing?