Ver Mensaje Individual
  #2  
Antiguo 15-07-2005
iuqrul iuqrul is offline
Miembro
 
Registrado: dic 2004
Ubicación: Cartagena
Posts: 36
Reputación: 0
iuqrul Va por buen camino
Hola, dado que el evento te pasa el Column, puedes probar por indice:

procedure TForm1.DBGrid6CellClick(Column: TColumn);
begin
with Column do
case Index of
0: Form11.Show;
1: Form12.Show;
2: Form13.Show;
end;
end;

o por campo/nombre de campo:

procedure TForm1.DBGrid6CellClick(Column: TColumn);
begin
with Column do
if FieldName = 'Campo1' then
Form11.Show
else if FieldName = 'Campo2' then
Form12.Show;
else if Field = Grid.DataSource.DataSet.FieldByName('Campo3')
Form13.Show;
end;
end;

Un saludo.

Responder Con Cita