On 9/13/10 12:59 PM, Jim Byrnes wrote:
> Ed Leafe wrote:
>> On Sep 13, 2010, at 2:49 PM, Jim Byrnes wrote:
>>
>>> If I run: self.UserSQL = """select * from items where done is
>>> Null"""
>>>
>>> The 'done' column cells show<None>.
>>>
>>> Is there a way to just leave them blank?
>>
>> Sure: set the NoneDisplay property. It exists at the dApp level,
>> which will affect how *all* None values are displayed in your app.
>> You can override that at the individual grid or textbox level by
>> setting the NoneDisplay property of those controls.
>>
>
> Right, I did look before I asked? Must have been fixated on Null.
I think you'll find that you'll want to discriminate between fields that have
no
defined value (None) and fields that have "" as their value.
I'd leave some sort of non-blank NoneDisplay for the general case, and set a
VirtualField in the Bizobj for the read-only display value of the field which
you can
use in grid columns or other read-only contexts. For example:
class MyBiz(dabo.biz.dBizobj):
def initProperties(self):
...
self.VirtualFields["display_item_description"] =
self.getDisplayItemDescription
...
def getDisplayItemDescription(self):
v = self.Record.item_description
if not v:
return ""
# perhaps other processing for other reasons here
return v
Paul
_______________________________________________
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]