On May 14, 2012, at 9:36 AM, Adrian Klaver wrote:

> Yes. Though I code my forms by hand. In other words I do not use 
> ClassDesigner.

        That would make no difference.

> I do nothing special though:
> 
>  priceCol = dabo.ui.dColumn(self, Name="stPrice", Caption="Price",
>             DataField="st_trans_price", DataType="decimal.Decimal",
>             Editable=True)
>  self.addColumn(priceCol)
> 
> This pulls from a Postgres database where the st_trans_price is a 
> numeric field with a scale of 5. This is reflected in the displayed values.

        I think the problem is that you are setting the DataType to the string 
"decimal.Decimal", instead of the actual type. Assuming that you have:

from decimal import Decimal

...at the top of your script, try changing the column creation to:

 priceCol = dabo.ui.dColumn(self, Name="stPrice", Caption="Price",
            DataField="st_trans_price", DataType=Decimal,
            Editable=True)
 self.addColumn(priceCol)



-- Ed Leafe



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to