Mediv Posted March 29, 2012 Posted March 29, 2012 Hi Farshad. In the build is 927 for the installation Query Component -> Fields Editor -> DisplayFormat = 0.00, a value of zero in the grid displayed as 0.00, after upgrading to build 943 had to remove the formatting so that the value of 1153.23 was displayed, as 1.153, but the value of zero is now displayed as 0, and wanted to be like 0.00 How can I do this? Thank you. Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 Can you provide following info: DecimalSeparator ThousandsSeparator DisplayFormat Your Field data Value displayed in the grid. Quote
Mediv Posted March 29, 2012 Author Posted March 29, 2012 Can you provide following info: DecimalSeparator ThousandsSeparator DisplayFormat Your Field data Value displayed in the grid. Settings on the computer - 12 pic DisplayFormat empty - 11,13 pic DisplayFormat not empty - 14,15 pic If pointing DisplayFormat, it is rounding the data. Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 What is the field type? Quote
Mediv Posted March 29, 2012 Author Posted March 29, 2012 What is the field type? Field type Float Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 I can't reproduce. Finally what is your Delphi version and browser type ? Quote
Mediv Posted March 29, 2012 Author Posted March 29, 2012 I can't reproduce. Finally what is your Delphi version and browser type ? Chrome 18.0.1025.142 beta-m, delphi 2007 Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 In my PC it behaves like this: DecimalSeparator = , ThousandSeparator= . DisplayFormat = Empty , Value diplayed as 1.23 (expected behavior) DisplayFormat = 0.00 , Value diplayed as 1,23 FieldType = TFloatField Can you send a simple test? Quote
Mediv Posted March 29, 2012 Author Posted March 29, 2012 In my PC it behaves like this: DecimalSeparator = , ThousandSeparator= . DisplayFormat = Empty , Value diplayed as 1.23 (expected behavior) DisplayFormat = 0.00 , Value diplayed as 1,23 FieldType = TFloatField Can you send a simple test? I'll try to do it on your example DBLookup, but only tomorrow. Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 Make sure you have the latest build 0.88.1.943 installed. You can use GridEditors demo. Quote
Mediv Posted March 29, 2012 Author Posted March 29, 2012 Make sure you have the latest build 0.88.1.943 installed. You can use GridEditors demo. I took your demo DBLookup. I put DisplayFormat = 0.00 for the field and was rounding TaxRate data, try, I can send your project If you are usin needed. Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 Interesting. Here it works as expected! Quote
Administrators Farshad Mohajeri Posted March 29, 2012 Administrators Posted March 29, 2012 Can anyone else reproduce this problem? Quote
Mediv Posted March 30, 2012 Author Posted March 30, 2012 DBLookup demo with the property set DisplayFormat = 0.00 for the field TaxRate, look, if you will show everything is normal, then the problem with the settings. DBLookup.zip Quote
Mediv Posted March 30, 2012 Author Posted March 30, 2012 I changed the settings on my computer and everything was fine display. Quote
Administrators Farshad Mohajeri Posted March 30, 2012 Administrators Posted March 30, 2012 My PC's local setting is same as yours. I'll test with build 943 in another PC to see the results. Quote
Administrators Farshad Mohajeri Posted March 30, 2012 Administrators Posted March 30, 2012 I can't reproduce in any of my PCs. Please re-check your uniGUI version. Quote
Mediv Posted March 30, 2012 Author Posted March 30, 2012 I can't reproduce in any of my PCs. Please re-check your uniGUI version. build 943. Well, I decided to have a problem changing the settings on my computer, the main thing that works as expected. Thanks for your help. Quote
dionel1969 Posted March 30, 2012 Posted March 30, 2012 Hello !!! I need to know something, and I need a help from you. I have a field "MontoAPrestar" of type TBCDField (Money in the DB), and all the time in the user interface appears an error when user type numbers in the form's field using comma. OS: Windows XP Delphi: 2009 Browser: Chrome UNIGUI: 941 Is there something I'm missing? This error comes from UNIGUI, from Delphi, from Browser??? Note: I saw this entry in the "what's new" of .943 build - 0001270: UniDBGrid: Float/number field ignores decimal/thousand separators. It concern to my problem too or not? Quote
Administrators Farshad Mohajeri Posted March 30, 2012 Administrators Posted March 30, 2012 This a Delphi error. While editing comma should not be used because uniGUI doesn't support EditFormat yet. Quote
Mediv Posted March 30, 2012 Author Posted March 30, 2012 This a Delphi error. While editing comma should not be used because uniGUI doesn't support EditFormat yet. Thanks, I'll keep in mind. This error only in delphi 2007 or xe2 will also? In the near future we plan to compile the project under delphi xe2. Quote
Administrators Farshad Mohajeri Posted March 30, 2012 Administrators Posted March 30, 2012 Thanks, I'll keep in mind. This error only in delphi 2007 or xe2 will also? In the near future we plan to compile the project under delphi xe2. You can use Comma in display format with no problem. When entering float data in cell we need to use DOT as decimal separator and no comma. It is same for all Delphi versions. Quote
dionel1969 Posted March 31, 2012 Posted March 31, 2012 This a Delphi error. While editing comma should not be used because uniGUI doesn't support EditFormat yet. . Quote
Administrators Farshad Mohajeri Posted March 31, 2012 Administrators Posted March 31, 2012 This a Delphi error. While editing comma should not be used because uniGUI doesn't support EditFormat yet. So?? Quote
delphici Posted July 17, 2014 Posted July 17, 2014 Query Run Time Field DisplayFormat Unit uses add Data.DB, procedure Form1.UniButton1Click(Sender: TObject); begin with Query1 do begin Close; SQL.Clear; SQl.Add('Select * from Table'); open; end; TFloatField(Query1.FieldByName('FieldName')).DisplayFormat :='###,###'; if not Query1.IsEmpty then begin UniDBGrid1.DataSource := DataSource1; end else begin UniDBGrid1.DataSource := nil; end; end; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.