PowerBuilder Forum

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Is Row Level formatting possible in PB 9.0?


Newbie

Status: Offline
Posts: 2
Date:
Is Row Level formatting possible in PB 9.0?


Hello Friends,
         We have a problem here, where in based on the the drop-down value, the decimal places for another column needs to be altered.
Column - AmountType can have Dollar Amount or Share Amount or Percentage.
Based on the selection of the above column, if the dropdown value is ShareAmount, display 4 decimal places, else two decimals in the Amount column.
A direct expression is obviously not possible on the format/edit masks of the column and trying via the powerscript also does not prove useful.  If the format of 1 record changes, the whole series of records also change.
Does anyone here have a solution to this (using PB9.0)? Any help would be greatly appreciated.

-Abhilash



__________________


Newbie

Status: Offline
Posts: 2
Date:

Please note the above question is about formatting in a Datawindow.

-Abhilash

__________________


Veteran Member

Status: Offline
Posts: 40
Date:

Handle this in the ItemChanged event of the DataWindow. Something like:

String ls_mask

CHOOSE CASE dwo.Name
CASE 'amount_type'
CHOOSE CASE Data
CASE 'dollar_amount'
ls_mask = '$#,##0.00'
CASE 'percentage'
ls_mask = '##0.0%'
CASE 'share_amount'
ls_mask = '#,##0.0000'
END CHOOSE

Modify( "value_column.EditMask.Mask = '" + ls_mask + "'" )
END CHOOSE


__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard