datagrid: how to apply a numberFormat to a column?
    zryip theSlug 
    zryip.theslug at gmail.com
       
    Thu Apr  7 04:47:56 EDT 2011
    
    
  
On Mon, Apr 4, 2011 at 2:16 PM, JosepM <jmyepes at mac.com> wrote:
> I'm trying to apply a numberFormat to a column but nothing change.
>
> In the database I have 4 decimals but I want to show only 2.
>
> Into the FillData I put:
>
> set the numberFormat to "#.00"
Hi Josep,
Have a look to numberFormat in the dictionary. The numberFormat
formats result of numeric calculations.
So a possible solution is to multiply pData by 1 in the fillinData handler:
on FillInData pData
   set the numberFormat to "#.00"
   set the text of field 1 of me to (pData * 1)
end FillInData
Best regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
    
    
More information about the use-livecode
mailing list