Lo que deberías hacer es derivar de TObjectList y crearte tu propia lista, simplificará mucho las cosas.
Código Delphi
[-]
TRows = class(TObjectList)
private
protected
function GetItem(Index: Integer): TwwGrid;
procedure SetItem(Index: Integer; ARow: TwwGrid);
public
property Items[index:integer] : TwwGrid read GetItem write SetItem;
function Busca(Nombre:string):integer;
published
end;
implementation
function TRows.GetItem(Index: Integer): ;
begin
Result := TwwGrid(inherited GetItem(index));
end;
procedure TRows.SetItem(Index: Integer; ARow: TwwGrid);
begin
inherited SetItem(index, ARow);
end;
function TRows.Busca(Nombre:string):integer;
begin
for Result := 0 to Count -1 do
if items[i].Name = Nombre then
Exit;
Result:= -1;
end;
Ahora ya tienes redefinido el TobjectList para guardar Grids de tu propio tipo.
Si quieres buscar uno:
Código Delphi
[-]
var idx:integer;
begin
idx := ListaGrids.Busca('dbgrid1');
if idx <> -1 then
PageControl1.ActivePage := TTabsheet(ListaGrids[i].Parent);
end;
... Hay formas mejores, pero tendrías que modificar mucho, no sé si será viable. Si estas interesado, pregunta.
Saludos