CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Numeric Formatting for data aware JQLabelEx

by JohnFSklavounos » 03 Jan 2015 05:02

Hi Guys,

Any ideas on how to format a numeric in a data aware JQLabelEx?

Thanks for any advice!

Best,
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by Alexander Bulei » 05 Jan 2015 10:34

Hi John,

We have added new event for this purpose:

Code: Select all
IWCGJQLabelEx:
- Added: new event OnSetText - trigger on set new next


Available in next beta build.

Thanks.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by JohnFSklavounos » 05 Jan 2015 17:27

Wow, you guys are amazing! Thank you very much. :D
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by Jorge Sousa » 06 Jan 2015 11:07

Hi John

You must use Field.OnGetText or Field.DisplayFormat for this purpose.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by JohnFSklavounos » 06 Jan 2015 14:16

Hi Jorge,

I can't do that in this particular instance, I have the same field displayed in two different tabs but formatted slightly differently. One is full precision and the other is standard currency.

When the beta comes available I will use that.

Thanks!
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by Jorge Sousa » 06 Jan 2015 15:26

Hi

The OnSetText made no sense, I removed.

You must use Field.OnGetText. It's the only way for any data aware control
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by JohnFSklavounos » 06 Jan 2015 17:39

Hi Jorge,

I do think that it makes sense and is a good feature, I hope you decide to keep it in :). I believe the analogous standard Delphi component is the DBText component. In that component it is available in the form of;

DBText.GetTextBuf(Buffer: PWideChar; BufSize: integer);
DBText.SetTextBuf(Buffer: PWideChar);

For my purposes (and memory / data utilization) it makes better sense that only one data field be tied to multiple labels with different masks. I'd really rather not have the field in my queries more than once just to display one at 6 decimal places and another at 2. Granted, this may not really be a feature that many programmers have asked for but I do think that it can be very useful.

Thanks for listening & I really appreciate all you do and your amazing responsiveness.

All my best,
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by Jorge Sousa » 06 Jan 2015 22:30

Hi

It's a good feature to implement at the Datalink level yes, not for the LabelEx only.

It will take some time, but this way will be useful for any control that uses the DataLink property.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 19 Jan 2015 17:15

Hi

We did this for next release, available for download tomorrow

DataLink:
- Added events OnUpdateControl to modify the behaviour when the controls needs to be updated with the field value and OnUpdateField when the field data needs to be set because of an insertion or edition.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by JohnFSklavounos » 19 Jan 2015 18:43

All I can say is WOW! Thanks again for all you do. :D

Best,
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

Next

Return to JQLabelEx

cron

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.