Reputation: 151
I have a TLinkPropertyToField Binding a TRadioGroup (Custom) to a Field using the ItemIndex property but I don't know why it doesnt pass the changes to the DataSet
Code:
auxLink := TLinkPropertyToField.Create(aOwner);
auxLink.Component := aOwner.FindComponent(aField.FieldName);
auxLink.ComponentProperty := 'ItemIndex';
auxLink.DataSource := BindSource;
auxLink.FieldName := aField.FieldName;
auxLink.Active := true;
Upvotes: 1
Views: 361
Reputation: 5263
Unfortunately, TLinkPropertyToField
does not naturally provide the requested functionality. See documentation:
Tip: The user input to this component is not monitored using an observer.
In other words the link is one way only.
You need pass the changes to ItemIndex
manually or subclass the TLinkPropertyToField
adding observer functionality. I doubt it is worth doing.
Upvotes: 1