:: Forum >>

Enter decimal values in cell

Hi,
Can any one help me in implementing the decimal values in the cell.
At present I can only enter the integer value into the cell like 34, 45, 12, 1, etc...
But I need to enter decimal values into the cell, like 13.5, 14.34, 54.98 etc.
Please help me to implement.

Thanks
Sanjay Sharma
Monday, September 25, 2006
Alex, Could you please help me with the issue of saving the decimal values from the cell.
Sanjay Sharma
Tuesday, September 26, 2006
Maybe this is the problem with your validation code?
Alex (ActiveWidgets)
Tuesday, September 26, 2006
Thanks Alex,
There was a problem in my backend. Now got resolved. Thanks much for the effort.
Can you tell me how to format the values.
for example, if I have the value like 23 to change to 23.0 or 23.00 or 23.000 based on logic.
or to convert the 23.0 or 23.00 or 23.000 to 23 only.
Sanjay Sharma
Tuesday, September 26, 2006
Sanjay I think you would have to write a javascript function to do this for you.
Here is an example of a function that determines if a given string is numeric.

you can adapt it to add '0' or '00' or remove it etc depending on your logic. I.e you can loop through your String and when you find a '.' stop looping and return that Integer value. etc

function isNumeric(strString) {
// check for valid numeric strings
var strValidChars = "0123456789.-";
var strChar;
var blnResult = true;

if (strString.length == 0) return false;

// test strString consists of valid characters listed above
for (i = 0; i < strString.length && blnResult == true; i++)
{
strChar = strString.charAt(i);
if (strValidChars.indexOf(strChar) == -1)
{
blnResult = false;
}
}
return blnResult;
}
Paul
Thursday, September 28, 2006

This topic is archived.


Back to support forum

Forum search