Gustavo_GRSoft Posted January 27 Share Posted January 27 hey guys... Is there any way for TUniNumberEdit not to remove the zeros on the right? for example, I have the value of 2.50 but it only shows 2.5 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted January 27 Share Posted January 27 Maybe this can help : http://forums.unigui.com/index.php?/topic/13823-decimal-point-using-a-tablet-or-mobile-phone/&do=findComment&comment=74503 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28 Share Posted January 28 Hello @Gustavo_GRSoft Can you use UniFormattedNumberEdit instead? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28 Share Posted January 28 22 hours ago, Gustavo_GRSoft said: TUniNumberEdit For this you can try to use this approach: UniNumberEdit.ClientEvents.UniEvents -> function afterCreate(sender) { sender._setFormattedValue = function() { var formattedValue = Ext.util.Format.number(sender.getValue(), '0.00'); sender.setRawValue(formattedValue); sender.un('dirtychange', sender._setFormattedValue); }; sender.on('blur', function(field) { if (field.getValue() !== field.getRawValue()){ field._setFormattedValue() } }); sender.on('dirtychange', sender._setFormattedValue); } Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 28 Author Share Posted January 28 6 hours ago, Sherzod said: Hello @Gustavo_GRSoft Can you use UniFormattedNumberEdit instead? Nice, work´s, THANKS... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.