Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

Re: PB : edit - editmask - regional settings

$
0
0

Hi Chris and Dale,

 

thanks both for your reply.

 

"To advise the user " ? They have a second application that requires a point as decimal sign and a space as thousand/millions separator. So changing the regional settings cant be done (unfortunately).

 

1)

I would try something like the editchanged but i don't get that far. 

Try the following , set a dot as decimal separator , set a space as thousand/millions separator.

Have the editmask ###########.00  on a decimal column.

Try typing 1,23 for example.

As soon as i type the 1 , its automatically converted to 1000,00

 

2) So i gave it a try without an editmask , use the edit but no mask.

 

This works ok , but then again the user has the possibility to type more numbers than allowed , compared to its column database definition.

 

OK, i guess i can use the editchanged event here to limit the input of the user so i won't get any ODBC errors popping up.

 

 

This has some implications though

 

- how can i retrieve the max allowed number of numbers for each column before and after the decimal separator ? Some are declared as dec(5,2)  , others as dec(18,3) ,and so on...

 

- because i don't want to maintain 2 different datawindows i guess i'll have to use some scripting in the constructor event to "disable" the edit mask #########.00 defined in the dw painter and use an empty edit mask for that one customer. How do i script this ?

dw_a.Modify(column_name + ".EditMask = ''") ?

 

 

TIA

John    


Viewing all articles
Browse latest Browse all 7329


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>