- This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
hi,kim
NavigatorPH: IkbmMWBinding;
NavigatorPH.Navigator.Append;
NavigatorPH.Navigator.Value[‘fcs’] := 6;// Show xxxx.DataSet not in edit mode .
kbmMW 5.15.10
best regards
Tom YU.
fixed code:
procedure TkbmMWBindingDataSourceNavigator.SetValue(const AName:string; const AValue:TValue);
var
fld:TField;
begin
if IsValid then
begin
fld:=FDataSource.Dataset.FindField(AName);
if fld<>nil then
begin
if not (FDataSource.Dataset.State in [dsEdit,dsInsert]) then //+++++
FDataSource.DataSet.Edit;//+++++
fld.AsVariant:=TkbmMWRTTI.ConvertValue2Variant(AValue,nil);
FDataSource.DataSet.Post;//+++++
end;
end;
end;
hi, kim
In fact, this problem has existed since 5.10.10, and we look forward to official corrections.
best regards
Tom YU.
Hi,
Thank you for your bugreport and suggestion for a solution.
I have implemented a variant of it for next release.
procedure TkbmMWBindingDataSourceNavigator.SetValue(const AName:string; const AValue:TValue);
var
fld:TField;
b:boolean;
begin
if IsValid then
begin
fld:=FDataSource.Dataset.FindField(AName);
if fld<>nil then
begin
b:=FDataSource.Dataset.State in [dsEdit,dsInsert];
if not b then
FDataSource.DataSet.Edit;
fld.AsVariant:=TkbmMWRTTI.ConvertValue2Variant(AValue,nil);
if not b then
FDataSource.DataSet.Post;
end;
end;
end;
/Kim