Hi,
I have this:
private void edtVal1_CustomDisplayText_1(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e)
{
if (Properties.Settings.Default.IsMGDL)
{
edtVal1.Properties.Mask.EditMask = "d";
edtVal1.Properties.DisplayFormat.FormatType = FormatType.Numeric;
edtVal1.Properties.DisplayFormat.FormatString = "d";
edtVal1.Properties.EditFormat.FormatType = FormatType.Numeric;
edtVal1.Properties.EditFormat.FormatString = "d";
edtVal1.Properties.MinValue = 70;
edtVal1.Properties.MaxValue = 140;
edtUnit1.EditValue = "mg/dl";
}
else
{
edtVal1.Properties.Mask.EditMask = "n1";
edtVal1.Properties.DisplayFormat.FormatType = FormatType.Numeric;
edtVal1.Properties.DisplayFormat.FormatString = "n1";
edtVal1.Properties.EditFormat.FormatType = FormatType.Numeric;
edtVal1.Properties.EditFormat.FormatString = "n1";
edtVal1.Properties.MinValue = 1.0; <==================
edtVal1.Properties.MaxValue = 35.0; <=====================
edtUnit1.EditValue = "mmol/l";
}
}
Open in new window
I get an error at the 2 lines that I have marked with an arrow.
"Literal of type double cannot be implicitly converted to type 'decimal'; use an 'M' suffix to create a literal of this type"
What can I do about this to solve this?
Peter
It helped me alot.
Greetings,
Peter Kiers