Link to home
Start Free TrialLog in
Avatar of kokan
kokan

asked on

How to supress showing of zero value

I have datawindow with 10 similar double field for edit.  During runtime, I will try to insert 10 rows to the DW control and make it become a 10x10 field for input value. Now since I need to compute the subtotal for rows and columns and so I intialise each field with zero.  However, for easy viewing, I would like to suppress showing all the zero value.  I've try to set a rule in the datawindow object in the column.color attribute, like "if ([column] = 0, rgb(255,255,255), 0)"  However it doesn't work well since when I try to input value, since the font color is now white(same as backgroud), I can't view the value before I jump to another field. Do anyone have other good and easy suggestion?
ASKER CERTIFIED SOLUTION
Avatar of Bhatti
Bhatti

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rajeXsh
rajeXsh

Set the format of all the fields to '#' (# is zero supression)
Use editchanged event:
If data argument is != 0, change the color back.

If this is not clear - I will send you the code.
Lev
Avatar of kokan

ASKER

Finally, I done it by put the formula [ if [column] = 0, "#", "0.00" ] in the format attribute of the column object.  It works very fine!  Thank you for all of you's valuable suggestion.