>Hello all
>
>Is there a way to format a column in the grid conditionally. Suppose I have a phone # field which may be empty in some cases as well. I want to use (XXX)XXX-XXXX where this field is not empty and a blank where it is empty. It shows ( ) - where field is blank. How to avoid it.
>
>Thanks
>
>Rajesh
You can use DynamicInputMask propertie of the column, something like that:
thisform.Grid1.ColumWithPhone.DynamicInputMask = "IIF(EMPTY("+thisform.Grid1.RecordSource"+".PhoneFiled),'','@R (###)###-####')"
But if the user start enter the data in a blank Phone Field there will be no Inputmask for that field.
BTW I use VFP 8.0 SP1 to thest it.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.