(Patch)RadioItems from TDBRadioGroup is changeable also by TDataSet.ReadOnly=true
Original Reporter info from Mantis: SunyD @soner-a
-
Reporter name: Soner
Original Reporter info from Mantis: SunyD @soner-a
- Reporter name: Soner
Description:
RadioItems from TDBRadioGroup is changeable also when associated TDataSet is ReadOnly.
The Datafield value does not changed only the Radioitems can be selected.
Steps to reproduce:
- Start the example
- Click readonly-Button
- Click on the DBRAdioGroup on the left.
- Look in the grid, the value doesn't changed only
the selected RadioButton is changed.
- Apply my patch and start the example again.
Additional information:
This is the Patch (only the last 4 lines):
lcl\include\dbradiogroup.inc
procedure TDBRadioGroup.UpdateRadioButtonStates;
// .. dont change it shows only where to add the patch
if (NewValue<>OldValue) and FDatalink.CanModify and not SettingValue then
begin
// .. dont change it shows only where to add the patch
end
//; Soner FOLLOWING IS PATCH ..........
else if (not DataLink.CanModify) and (DataLink.Field.AsString<>NewValue) then begin
fValue:=''; // because in procedure TDBRadioGroup.SetValue is
// if FValue=AValue then exit;
Value:= OldValue;
end;
end;
Mantis conversion info:
- Mantis ID: 31993
- OS: Windows
- OS Build: 7, XP, 10
- Build: Svn:54278, fpc.3.0.2
- Platform: i386
- Version: 1.6.4
- Fixed in revision: 55344 (#13abe9d0)
- Target version: 1.8RC2
- LazTarget: 1.8