I have a simple RadNumericTextbox (prometheus version) with the following properties set.
|<telerik:RadNumericTextBox ID="priceTextbox" runat="server" AutoPostBack="True" MinValue="0" Type="Currency"></telerik:RadNumericTextBox> |
I use the text box to capture some values from the user and save these values to the database. Everything works as expected at this stage.
However, when i retrieve the data from the database and attempt to redisplay the data some weird behaviour occurs. When the page loads, the text box appears to have the correct value in there (and focus is on that textbox). If i move focus away from the textbox, without changing the value, the text box will now display a number that is a factor of 100 less than the original
e.g. if the value was $250.00, once focus leaves the box it becomes $0.25.
If i manually type in 250 on top of the original 250 this problem does not occur.
The way i populate the textbox is shown below:
|1||//unit_price is a decimal value retrieved from a database. |
//This value is correct when retrieved from the database
|2||priceTextbox.Value = Convert.ToDouble(unit_price); |
Any help would be appreciated