How do I set a textbox that has been assigned to a NumericTextBoxSetting control to accept real numbers. ie: a number with any number of decimal places.
The DecimalDigits property allows the setting to be 0 up to 99. This is not what I need. What if my user enters a number with 600 decimal places?
Here is my code.
In the code above I have commented out the DecimalDigits line. Running this I get a textbox that accepts real numbers just fine, but always round them down to 2 decimal places! Huh?
I need one that accepts numbers of any number of decimal places.
I even tried this...
But that of course does not work (would have been nice if it did) :)
Any clues on this one please?
Thanks
Brad
The DecimalDigits property allows the setting to be 0 up to 99. This is not what I need. What if my user enters a number with 600 decimal places?
Here is my code.
TextBox tbFloat = new TextBox();string fID = ID + "Value" + i2;tbFloat.ID = fID;tbFloat.Attributes.Add("name", fID);tbFloat.Text = Value;c2.Controls.Add(tbFloat); Telerik.Web.UI.NumericTextBoxSetting radF = new Telerik.Web.UI.NumericTextBoxSetting();radF.EmptyMessage = "";//radF.DecimalDigits = ? ;
radF.Type = Telerik.Web.UI.NumericType.Number;radF.Validation.IsRequired = false; TargetInput fi = new TargetInput();fi.ControlID = fID;radF.TargetControls.Add(fi); RadInputManager1.InputSettings.Add(radF);In the code above I have commented out the DecimalDigits line. Running this I get a textbox that accepts real numbers just fine, but always round them down to 2 decimal places! Huh?
I need one that accepts numbers of any number of decimal places.
I even tried this...
radF.DecimalDigits = -1 ;But that of course does not work (would have been nice if it did) :)
Any clues on this one please?
Thanks
Brad