Hi,
I used the AppWizard to create a basic crud app for use at work and am having an issue trying to set the precision value of some columns in the grid to something greater than 2. The data I have in my sqlite db is a precision val of 4-6.
I see that I can view the items in the object inspector but cannot make heads of it by setting it to what I want or need. I also looked in the code that is generated and do not see in there where I can set the precision level to something higher than 2.
Any ideas?
Thanks,
Tom Russell
________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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/3EB5C64F2911F841A886AC1D5EA8C356BA5386@041-DB3MPN1-023.041d.mgd.msft.net
On Apr 18, 2012, at 12:28 PM, RUSSELL Thomas wrote:
> I used the AppWizard to create a basic crud app for use at work and am having an issue trying to set the precision value of some columns in the grid to something greater than 2. The data I have in my sqlite db is a precision val of 4-6.
>
> I see that I can view the items in the object inspector but cannot make heads of it by setting it to what I want or need. I also looked in the code that is generated and do not see in there where I can set the precision level to something higher than 2.
>
> Any ideas?
I looked through the code, and we don't expose the Precision property in the Class Designer for columns. I've added it, but it isn't getting set properly, so I think that there may be a bug in the way that dGrid selects its renderers. Let me dig in a little deeper and I'll post something as soon as I find out what the issue is.
-- Ed Leafe
_______________________________________________
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/97872CD9-7595-4EEF-9BB4-88749ECB6078@leafe.com
Author: RUSSELL Thomas
Posted: 2012-04-20 10:22:51 Link
Thanks Ed.
Tom Russell
Test/Software Engineer
1025 John St.
W. Henrietta, NY 14586
O: 585-279-1744
M: 585-953-7529
-----Original Message-----
From: dabo-users-bounces@leafe.com [mailto:dabo-users-bounces@leafe.com] On Behalf Of Ed Leafe
Sent: Friday, April 20, 2012 11:19 AM
To: Dabo Users list
Subject: Re: [dabo-users] Precision Value in Grid Column
On Apr 18, 2012, at 12:28 PM, RUSSELL Thomas wrote:
> I used the AppWizard to create a basic crud app for use at work and am having an issue trying to set the precision value of some columns in the grid to something greater than 2. The data I have in my sqlite db is a precision val of 4-6.
>
> I see that I can view the items in the object inspector but cannot make heads of it by setting it to what I want or need. I also looked in the code that is generated and do not see in there where I can set the precision level to something higher than 2.
>
> Any ideas?
I looked through the code, and we don't expose the Precision property in the Class Designer for columns. I've added it, but it isn't getting set properly, so I think that there may be a bug in the way that dGrid selects its renderers. Let me dig in a little deeper and I'll post something as soon as I find out what the issue is.
-- Ed Leafe
_______________________________________________
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/97872CD9-7595-4EEF-9BB4-88749ECB6078@leafe.com
________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
_______________________________________________
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/3EB5C64F2911F841A886AC1D5EA8C356BA64CD@041-DB3MPN1-023.041d.mgd.msft.net
Author: Paul McNett
Posted: 2012-04-20 11:03:56 Link
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
On Apr 20, 2012, at 11:03 AM, Paul McNett wrote:
> 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.
There still is a problem, though. I have cursor with all different data types, but they are all displayed using the default self.stringRendererClass. I'm looking into where the code is failing to properly set the renderer.
-- Ed Leafe
_______________________________________________
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/18F0B16F-64AF-4E10-A1AF-082EF5D0609D@leafe.com
Author: Paul McNett
Posted: 2012-04-20 12:16:41 Link
On 4/20/12 9:11 AM, Ed Leafe wrote:
> On Apr 20, 2012, at 11:03 AM, Paul McNett wrote:
>
>> 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.
>
> There still is a problem, though. I have cursor with all different data types, but they are all displayed using the default self.stringRendererClass. I'm looking into where the code is failing to properly set the renderer.
If you are creating the string exactly how you want it displayed in the VirtualField,
why do you care if it is displayed in the grid using the string renderer?
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/4F9199F9.1010506@ulmcnett.com
On Apr 20, 2012, at 12:16 PM, Paul McNett wrote:
>> There still is a problem, though. I have cursor with all different data types, but they are all displayed using the default self.stringRendererClass. I'm looking into where the code is failing to properly set the renderer.
>
> If you are creating the string exactly how you want it displayed in the VirtualField,
> why do you care if it is displayed in the grid using the string renderer?
You're missing the point. "Default" means that the grid should select the appropriate renderer for the given data type. It isn't doing that.
Of course, if you go to all the trouble of defining VirtualFields for all your data, then that's fine. But you shouldn't *have to* do that to get correct behavior.
-- Ed Leafe
_______________________________________________
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/C46CADA4-2002-43FE-8DB6-4E1BA9186CCA@leafe.com
Author: Paul McNett
Posted: 2012-04-20 12:26:12 Link
On 4/20/12 10:21 AM, Ed Leafe wrote:
> On Apr 20, 2012, at 12:16 PM, Paul McNett wrote:
>
>>> There still is a problem, though. I have cursor with all different data types, but they are all displayed using the default self.stringRendererClass. I'm looking into where the code is failing to properly set the renderer.
>>
>> If you are creating the string exactly how you want it displayed in the VirtualField,
>> why do you care if it is displayed in the grid using the string renderer?
>
> You're missing the point. "Default" means that the grid should select the appropriate renderer for the given data type. It isn't doing that.
Sorry, I thought you were commenting on my proposed VirtualFields solution. "There is
still a problem, though" I took to mean as a problem with my approach.
> Of course, if you go to all the trouble of defining VirtualFields for all your data, then that's fine. But you shouldn't *have to* do that to get correct behavior.
I agree.
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/4F919C34.2080809@ulmcnett.com
Author: RUSSELL Thomas
Posted: 2012-04-24 10:38:44 Link
Should I wait to use the fixed built in way or the virtual way?
Thanks.
________________________________________
From: dabo-users-bounces@leafe.com [dabo-users-bounces@leafe.com] on behalf of Paul McNett [p@ulmcnett.com]
Sent: Friday, April 20, 2012 1:26 PM
To: Dabo Users list
Subject: Re: [dabo-users] Precision Value in Grid Column
On 4/20/12 10:21 AM, Ed Leafe wrote:
> On Apr 20, 2012, at 12:16 PM, Paul McNett wrote:
>
>>> There still is a problem, though. I have cursor with all different data types, but they are all displayed using the default self.stringRendererClass. I'm looking into where the code is failing to properly set the renderer.
>>
>> If you are creating the string exactly how you want it displayed in the VirtualField,
>> why do you care if it is displayed in the grid using the string renderer?
>
> You're missing the point. "Default" means that the grid should select the appropriate renderer for the given data type. It isn't doing that.
Sorry, I thought you were commenting on my proposed VirtualFields solution. "There is
still a problem, though" I took to mean as a problem with my approach.
> Of course, if you go to all the trouble of defining VirtualFields for all your data, then that's fine. But you shouldn't *have to* do that to get correct behavior.
I agree.
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/4F919C34.2080809@ulmcnett.com
________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
_______________________________________________
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/3EB5C64F2911F841A886AC1D5EA8C356BA66DA@041-DB3MPN1-023.041d.mgd.msft.net
On Apr 24, 2012, at 10:38 AM, RUSSELL Thomas wrote:
> Should I wait to use the fixed built in way or the virtual way?
Depends on how quickly you need it. ;-)
I've made some progress on this, but haven't gotten it working yet. That's the one thing I was trying to finish before the next Web Update release, so with any luck I should get it done today.
-- Ed Leafe
_______________________________________________
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/685390BD-0A6E-4837-914A-F2B9418FC214@leafe.com