Hey there,
I was wondering how to go about formatting a value within a DecimalColumn. When creating the column, I set decimal places to 5:
When using the spin edit controls to modify the value, everything stays formatted correctly (the displayed value contains five decimal places). However, if the user types a value into the spin edit (rather than using the up and down arrows), the value will stay exactly as they input - it will not format it to the five decimal display. So if a user types 2.5, that value sticks in there. Is there a way so that if the user enters 2.5, when they leave the cell it will be formatted to 2.50000?
Thanks in advance.
I was wondering how to go about formatting a value within a DecimalColumn. When creating the column, I set decimal places to 5:
decimalBoxColumn =
New
GridViewDecimalColumn
decimalBoxColumn.DataType =
GetType
(
Decimal
)
decimalBoxColumn.Name =
"Quantity"
decimalBoxColumn.FieldName =
"Quantity"
decimalBoxColumn.AllowSort =
False
decimalBoxColumn.TextAlignment = ContentAlignment.MiddleRight
decimalBoxColumn.DecimalPlaces = 5
decimalBoxColumn.HeaderText =
"Quantity"
decimalBoxColumn.HeaderTextAlignment = ContentAlignment.MiddleRight
decimalBoxColumn.MaxWidth = 100
BomRadGridView.MasterTemplate.Columns.Add(decimalBoxColumn)
When using the spin edit controls to modify the value, everything stays formatted correctly (the displayed value contains five decimal places). However, if the user types a value into the spin edit (rather than using the up and down arrows), the value will stay exactly as they input - it will not format it to the five decimal display. So if a user types 2.5, that value sticks in there. Is there a way so that if the user enters 2.5, when they leave the cell it will be formatted to 2.50000?
Thanks in advance.