Syncfusion v10.204.0.75
.Net 4.0, WPF (desktop app) project on Win 8.1
I have a requirement to allow users to enter a leading decimal point into a GridDataControl cell that is bound (Mapped) to a double. For example, the user needs to be able to enter .5 and 0.5. I have the column set to update on property changes, forcing the data binding to happen with every keystroke, so other fields can update as the user types. For other reasons, I am generating the grid in code dynamically, but that shouldn't matter.
I can't find a combination of flags or column types that will allow this to happen. Using Reflector on Syncfusion's dlls, I can see where the cell eventually calls Double.TryParse() on the string, which fails because it initially just contains this: "." It appears Syncfusions code effectively ignores a leading decimal in a GridDataDoule
Here's what I currently have, and any help would be appreciated.
var column = new GridDataDouleEditVisibleColumn() // note this class is misspelled in my version.
{
HeaderText = "Header",
MappingName = allocColumnName,
Binding = allocBinding, // this binding just adds a value converter that never fires in the case of a leading zero
Width = new GridDataControlLength(54d),
ColumnStyle = new GridDataColumnStyle()
{
Font = new GridFontInfo() { FontWeight = FontWeights.Bold },
IsEditable = true,
MaxLength = 4,
DoubleEdit = new GridDoubleEditStyleInfo()
{
IsScrollingOnCircle = false
},
//CellType = "DoubleEdit",
//CellEditTemplate = new DataTemplate()
NumberFormat = new System.Globalization.NumberFormatInfo()
{
NumberDecimalDigits = 1
},
}
};
Thanks,
Will.