View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0002131 | JEDI VCL | 00 JVCL Components | public | 2004-09-08 11:39 | 2006-04-05 01:20 | 
| Reporter | josz | Assigned To | obones | ||
| Priority | normal | Severity | trivial | Reproducibility | always | 
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.00 BETA | ||||
| Target Version | Fixed in Version | 3.30 | |||
| Summary | 0002131: TJvDBSpinEdit Value is always 0 when Field.DisplayFormat=>'' | ||||
| Description | When 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; | ||||
| Tags | No tags attached. | ||||
|  | I'm sorry, could you post a sample application, I can't find any Field.DisplayFormat property. Sorry for the delay answering this. | 
|  | 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. } begin if FDataLink.Field <> nil then begin 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 else begin 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; end; end else begin FIsNull := False; if csDesigning in ComponentState then Text := Name else Text := ''; end; end; | 
|  | 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 | 
|  | This is now in CVS | 
| 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 | 
