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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...