View Issue Details

IDProjectCategoryView StatusLast Update
0002131JEDI VCL00 JVCL Componentspublic2006-04-05 01:20
ReporterjoszAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.00 BETA 
Target VersionFixed in Version3.30 
Summary0002131: TJvDBSpinEdit Value is always 0 when Field.DisplayFormat=>''
DescriptionWhen for example, Field.DisplayFormat=#'%' then TJvDBSpinEdit.Value is always 0.
Example, Field.Value=4 >>> Field.DisplayText='4%' >> TJvDBSpinEdit.Value=0
To solve this behaviour replace the line in
procedure TJvDBSpinEdit.DataChange(Sender: TObject);
Text := FDataLink.Field.DisplayText;
must be
Text := FDataLink.Field.AsString;
TagsNo tags attached.



2005-05-20 03:13

administrator   ~0007266

I'm sorry, could you post a sample application, I can't find any Field.DisplayFormat property.
Sorry for the delay answering this.


2005-05-20 06:43

reporter   ~0007273

Sorry, the example had not enough info.
The behaviour exist when the DataField property is the name of a TNumericField or is derived from it.
TNumericField has a DisplayFormat property.

The modified procedure

procedure TJvDBSpinEdit.DataChange(Sender: TObject); { Triggered when data changes in DataSource. }
 if FDataLink.Field <> nil then
   if Focused and FDataLink.CanModify then
     Text := FDataLink.Field.AsString
     //modified by Jos Zonneveld sept 8, 2004
// Text := FDataLink.Field.Text
     //This is the result of formated values and wil result in Text=0
     FIsNull := (FDataLink.Field.DisplayText = '');
     Text := FDataLink.Field.AsString;
     //modified by Jos Zonneveld sept 8, 2004
// Text := FDataLink.Field.DisplayText;
     //This is the result of formated values and wil result in Text=0
     if FDataLink.Editing or (FDataLink.Field.DataSet.State = dsInsert) then
       Modified := True;
   FIsNull := False;
   if csDesigning in ComponentState then
     Text := Name
     Text := '';


2006-03-31 05:33

administrator   ~0008785

A slightly enhanced version of this is ready to be put in CVS and will be as soon as it is back up at SourceForge


2006-04-05 01:20

administrator   ~0008932

This is now in CVS

Issue History

Date Modified Username Field Change
2004-09-08 11:39 josz New Issue
2005-05-20 03:13 obones Note Added: 0007266
2005-05-20 03:13 obones Status new => feedback
2005-05-20 06:43 josz Note Added: 0007273
2006-03-31 05:33 obones Note Added: 0008785
2006-03-31 05:33 obones Status feedback => confirmed
2006-04-05 01:20 obones Status confirmed => resolved
2006-04-05 01:20 obones Resolution open => fixed
2006-04-05 01:20 obones Assigned To => obones
2006-04-05 01:20 obones Note Added: 0008932