Hi,

i  have the following problem,

If i set the datatype of a text feild to ULCPercentDataType and  if a user enters a very large value in this text feild it gets converted to exponential no (like 1.0E ) .... can this  be avoided  but still the formatting should be  with % sign at the end. 

In ULCtables if i use
Cell Editor as following

DecimalFormatSymbols symbols = new DecimalFormatSymbols();
ULCNumberDataType fnumber = new ULCNumberDataType("#.##",symbols);      fnumber.setFormattingPolicy(ULCNumberDataType.JAVA_TEXT_FORMATTING);
fnumber.setMinFractionDigits(1);
fnumber.setMaxFractionDigits(2);
ULCTextField editorTextField = new ULCTextField();
editorTextField.setDataType(fnumber);
DefaultCellEditor editor = new DefaultCellEditor(editorTextField);

And set the Table Cell Renderer  like the following 

ForecastTableCellRenderer tmpCR = (ForecastTableCellRenderer)column.getCellRenderer();

 DecimalFormatSymbols symbols = new DecimalFormatSymbols();
 ULCPercentDataType fnumber = new ULCPercentDataType(2);
 tmpCR.setDataType(fnumber);

if a  user  enters a value like

10000010 in a table cell,  when users  leaves the cell, value gets displayed as
1.00%  which is not desirable

enter 10000000  in table cell , when u come out of cell, cell  contains nothing
move back into cell the value 10000000 appears again .

values till 9000000 are displayed correctly that is u  change the value in table cell  to  9000000, come  out of cell it displays as 9000000

Any suggestions would be greatly appreciated
Thanks and Regards,
Gene


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

Reply via email to