View Issue Details

IDProjectCategoryView StatusLast Update
0004092JEDI VCL00 JVCL Componentspublic2007-06-19 09:13
ReporterultimoAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version3.30 
Target VersionFixed in Version 
Summary0004092: JvDBGrid CheckBox column
DescriptionRefer to 0004027.

with Field String and value 0 and 1 I propose this solution for not utilize event for default value


function TJvDBGrid.EditWithBoolBox(Field: TField): Boolean;
begin
  if FBooleanEditor then
  begin
    Result := (Field.DataType = ftBoolean);
    if (not Result) and
      (Field.DataType in [ftSmallint, ftInteger, ftLargeint, ftWord, ftString, ftWideString]) then
    begin
      FStringForTrue := '1';
      FStringForFalse := '0';
      if Assigned(FOnCheckIfBooleanField) then
        Result := FOnCheckIfBooleanField(Self, Field, FStringForTrue, FStringForFalse)
      else
        result := (Field.AsString = FStringForTrue) or (Field.AsString = FStringForFalse);
    end;
  end
  else
    Result := False;
end;

TagsNo tags attached.

Activities

obones

2007-06-19 09:12

administrator   ~0013467

Once again, no. String values for booleans can be TOO different depending on the user desire, the event is here for these cases.

Issue History

Date Modified Username Field Change
2007-04-05 05:02 ultimo New Issue
2007-06-19 09:12 obones Status new => resolved
2007-06-19 09:12 obones Resolution open => won't fix
2007-06-19 09:12 obones Assigned To => obones
2007-06-19 09:12 obones Note Added: 0013467