Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
custom unformatting not always working in edit form
26/04/2010
22:30
Avatar
ember
Member
Members
Forum Posts: 4
Member Since:
26/04/2010
sp_UserOfflineSmall Offline

Hi,

I'm using the custom formatter and unformat for some currency and % columns. 

There seems to be a problem when my custom unformat returns an empty string.  I really would like the field to be empty in the form, but I'd like to display a formatted empty value in the grid.  Is there something else I can return besides "" to get it to work and show an empty field?

This "works" by putting 0 in the field on the form (but I'd really like an empty string):

function  unfmatCurrency2 (cellvalue){
    if (cellvalue == "$ ---") {
        return "0";
    }
    else {
        return cellvalue.replace("$ ", "");    
    }
}

This does not work, because my form field is still "$ ---" instead of an empty string (which is what I want):

function  unfmatCurrency2 (cellvalue){
    if (cellvalue == "$ ---") {
        return "";
    }
    else {
        return cellvalue.replace("$ ", "");    
    }
}

Thanks!

Ember

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information