Hola ericgs.
Si conoces el nombre del campo índice:
Código Delphi
[-]
function GetGridIndex(const Grid: TDBGrid; const Nombre: string): Integer;
var
i: Integer;
begin
Result:= -1;
for i:= 0 to Grid.FieldCount -1 do
if Nombre = Grid.Fields[i].FieldName then
begin
Result:= i;
Exit;
end;
end;
Llamada ejemplo:
Código Delphi
[-]
var
Inx: Integer;
begin
Inx:= GetGridIndex(DBGrid1, 'Nombre_del_campo');
...
Saludos.