BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Renderer/Editor of a column with float value

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder DB Swing
View previous topic :: View next topic  
Author Message
Martin Frey
Guest





PostPosted: Wed Sep 08, 2004 1:23 pm    Post subject: Renderer/Editor of a column with float value Reply with quote



Hi
if i have a column that shows float values i get a display problem. Even if
i set the precision and/or scale of the column, the formatter doesn't care
about it.
So if the value is 0.001 it's shown correctly, but if the value if 0.0001
it's shown as 0. If i start editing the cell the value appears correct as
1.0E-4. So i think it's only a problem of the renderer. Does someone know
how i can get the renderer work correct? I can use the setFormatter() and
setPattern("######.########") but how can i change the pattern if i wana
display 0.001 and then 1.0E-4?

I use JBuilderX.

Thank you
Martin


Back to top
Paul Nichols (TeamB)
Guest





PostPosted: Fri Sep 17, 2004 5:25 am    Post subject: Re: Renderer/Editor of a column with float value Reply with quote



Martin Frey wrote:

Quote:
Hi
if i have a column that shows float values i get a display problem. Even
if i set the precision and/or scale of the column, the formatter doesn't
care about it.
So if the value is 0.001 it's shown correctly, but if the value if 0.0001
it's shown as 0. If i start editing the cell the value appears correct as
1.0E-4. So i think it's only a problem of the renderer. Does someone know
how i can get the renderer work correct? I can use the setFormatter() and
setPattern("######.########") but how can i change the pattern if i wana
display 0.001 and then 1.0E-4?

I use JBuilderX.

Thank you
Martin
I am assuming that this is in a JdbTable, right? What is the settings for

the Table Column (ie Field) in the QueryDataSet, as far as precision?


Back to top
Martin Frey
Guest





PostPosted: Mon Sep 20, 2004 8:40 am    Post subject: Re: Renderer/Editor of a column with float value Reply with quote



Yes it is in a jdbTable, but i think i doesnt matter. I solved it just yet
Smile
it's an oracle database and i had to set the datatype, sqlType to Double and
instanciate a new DoubleFormatter: column.setFormatter(new
DoubleFormatter(com.borland.dx.dataset.Variant.DOUBLE));
Jdbc and dataexpress is a "little" bit confusing sometimes. haha
Oh yes and in a jbuilder update it would be great if the SqlType of a column
would be java.sql.Types.DOUBLE and just a value ;)

Regards Martin.


"Paul Nichols (TeamB)" <paul (AT) comp (DOT) net> wrote

Quote:
Martin Frey wrote:

Hi
if i have a column that shows float values i get a display problem. Even
if i set the precision and/or scale of the column, the formatter doesn't
care about it.
So if the value is 0.001 it's shown correctly, but if the value if 0.0001
it's shown as 0. If i start editing the cell the value appears correct as
1.0E-4. So i think it's only a problem of the renderer. Does someone know
how i can get the renderer work correct? I can use the setFormatter() and
setPattern("######.########") but how can i change the pattern if i wana
display 0.001 and then 1.0E-4?

I use JBuilderX.

Thank you
Martin
I am assuming that this is in a JdbTable, right? What is the settings for
the Table Column (ie Field) in the QueryDataSet, as far as precision?




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder DB Swing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.