View Issue Details

IDProjectCategoryView StatusLast Update
0004573JEDI VCL00 JVCL Componentspublic2009-04-29 11:32
ReporterTrigger2003Assigned Toobones 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionsuspended 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0004573: JvCheckBox, DataConnector, Addition to 0004551
DescriptionIMHO it is better if JvCheckBox doesn't interact with the user at all until the connected Datasource really is in edit mode.

Old Code:
procedure TJvCheckBoxDataConnector.RecordChanged;
begin
  if Field.IsValid and (ValueChecked <> '') and (ValueUnchecked <> '') then
  begin
    FCheckBox.ReadOnly := not Field.CanModify;
    if not Field.IsNull then
      FCheckBox.Checked := AnsiCompareText(Field.AsString, ValueUnchecked) <> 0
    else
      FCheckBox.State := cbGrayed;
  end
  else
  begin
    FCheckBox.State := cbGrayed;
    FCheckBox.ReadOnly := True;
  end;
end;


Additional InformationNew Code:
procedure TJvCheckBoxDataConnector.RecordChanged;
begin
  if Field.IsValid and (ValueChecked <> '') and (ValueUnchecked <> '') then
  begin
    FCheckBox.ReadOnly := not (Field.CanModify and (DataSource.State in [dsEdit, dsInsert]));
    if not Field.IsNull then
      FCheckBox.Checked := AnsiCompareText(Field.AsString, ValueUnchecked) <> 0
    else
      FCheckBox.State := cbGrayed;
  end
  else
  begin
    FCheckBox.State := cbGrayed;
    FCheckBox.ReadOnly := True;
  end;
end;
TagsNo tags attached.

Activities

obones

2008-11-18 08:33

administrator   ~0015020

Please provide the zipped sources of a sample application showing the advantages of your fix

obones

2008-12-22 04:35

administrator   ~0015139

Any news ?

AHUser

2009-01-09 05:31

developer   ~0015228

Last edited: 2009-01-09 06:27

With this change a JvDBCheckBox would be only a state indicator and it wouldn't be possible to set the DataSet into edit/insert mode by clicking on the CheckBox.

obones

2009-04-29 11:32

administrator   ~0015442

No news, no change

Issue History

Date Modified Username Field Change
2008-11-07 09:19 Trigger2003 New Issue
2008-11-18 08:33 obones Note Added: 0015020
2008-11-18 08:33 obones Status new => feedback
2008-12-22 04:35 obones Note Added: 0015139
2009-01-09 05:31 AHUser Note Added: 0015228
2009-01-09 06:27 AHUser Note Edited: 0015228
2009-04-29 11:32 obones Note Added: 0015442
2009-04-29 11:32 obones Status feedback => resolved
2009-04-29 11:32 obones Resolution open => suspended
2009-04-29 11:32 obones Assigned To => obones