Hi.
How to use the grid gallery with the TTIWDBAdvWebGrid since it does'nt have the LoadVisualProps procedure ?
Thanks.
There is no direct method to do this.
You can use:
uses
IwPropPersist;
var
IWPropertyPersister: TIWPropertyPersister;
AIniFile: TIniFile;
i: integer;
begin
AINIFile := TINIFile.Create(galleryfilename);
IWPropertyPersister := TIWPropertyPersister.Create(Self);
try
IWPropertyPersister.IniLoadRTTIComponent(AINIFile,GRID,false);
with grid do
begin
if (Columns.Count > 0) then
begin
IWPropertyPersister.IniLoadRTTIComponent(AINIFile,Columns[0],false);
for i := 2 to Columns.Count do
begin
Columns[i - 1].AssignVisualProperties(Columns[0]);
end;
end;
finally
AINIFile.Free;
IWPropertyPersister.Free;
end;
end;