Jump to content

TUniFormmatedNumberEdit


rtalmeida

Recommended Posts

Hi, 

Can you please open a ticket in support portal?

At the moment you can try to use this approach I think (without "OnChange, OnChangeValue" on the server side):

function beforeInit(sender, config)
{
    var me=sender;
    config.listeners = {
        change: function(){
            if (me.getValue()!=0) {
                me.inputEl.setStyle('font-weight', 'bold')
            } else {
                me.inputEl.setStyle('font-weight', '')
            } 
        }
    };
}

 

Link to comment
Share on other sites

On 3/14/2019 at 6:41 PM, rtalmeida said:

I need the effect to occur also, not only when typed a value in the field, but also when it is fed into the form's onAfterShow, in the example I sent it places onAfterShow UniFormattedNumberEdit1.value: = 10;

Hi,

Try this:

function beforeInit(sender, config)
{
    var me=sender;
    config.listeners = {
        change: function(){
            if (me.getValue()!=0) {
                me.inputEl.setStyle('font-weight', 'bold')
            } else {
                me.inputEl.setStyle('font-weight', '')
            } 
        },
        dirtychange: function(){
            if (me.getValue()!=0) {
                me.inputEl.setStyle('font-weight', 'bold')
            } else {
                me.inputEl.setStyle('font-weight', '')
            } 
        }
    };
}

 

Link to comment
Share on other sites

On 3/14/2019 at 4:32 PM, rtalmeida said:

With the solution shown, it's working, but if I try to enter a negative number, it returns the error:
'' - 'is not a valid floating point value'.

I'll try to open the ticket, I never opened any.

I think, that could happened cause of my ticket:

http://jira.fmsoft.net/servicedesk/customer/portal/4/FSD-693

If you have sources you can try fix it:

in uniEdit module change StrToFloat to StrToFloatDef:

FValue := StrToFloat(S, FmtSettings);

to

FValue := StrToFloatDef(S, 0, FmtSettings);

Farshad, please fix it, I submit the ticket and solution at August.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...