is it intended, that the procedure TTMSFNCCustomControl.SaveSettingsToFile(AFileName: string; AAppearanceOnly: Boolean = False); does not save the applied filters, sorting or grouping for the TTMSFNCGrid?
I would have guessed, that if woul work when the parameter AAppearanceOnly is set to True but that also doesn´t work
This would be a very much appreciated feature for us
The SaveSettingsFile only saves the published properties. This is a method that comes automatically because of inheriting from TTMSFNCCustomControl. The filter is a public property.
Is there a way to save and restore the additional information in the exported json-file?
If not, is there another function that could be used to the layout of the TTMSFNCGrid?
I don´t need the data, just the layout.
My Apologies, I noticed a small error. I updated the orginal code sample. The fix is located here:
procedure TForm33.DoReadCustomProperty(AObject: TObject; APropertyName: string;
APropertyKind: TTypeKind; AReader: TTMSFNCJSONReader; var ACanRead: Boolean);
var
n: string;
v: string;
begin
if (AObject = TMSFNCGrid1) and (APropertyName = 'Adapter') then //NewProperty comes after Adapter
begin
--> ACanRead := False;
AReader.SkipValue;
n := AReader.ReadName; //NewProperty
v := AReader.ReadString; //value
end;
end;