Re: [dabo-users] Precision Value in Grid Column

Author: Paul McNett

Posted: 2012-04-20 at 11:03:56

On 4/20/12 8:22 AM, RUSSELL Thomas wrote:

> Thanks Ed.

The other possibility for rendering exactly what you want in dGrid is to use a

VirtualField in your bizobj that is a string exactly how you want the field rendered.

For example (pseudocode):

class MyBiz(dabo.biz.dBizobj):

def initProperties(self):

self.VirtualFields["display_amount"] = self.getDisplayAmount

def getDisplayAmount(self):

return "%.4d" % self.Record.amount

class MyGrid(dabo.ui.dGrid):

def afterInit(self):

self.addColumn(dabo.ui.dColumn(self, DataField="display_amount"))

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/4F9188EC.3070406@ulmcnett.com

©2012 Paul McNett