Récupérer la valeur d'une Dbgrid
Le plus simple serait biensur d'attaquer le champ de al table ou la Query rattaché a cette DBgrid.
Mais voici une autre solution :
Il faut tout d'abord rendre publique une méthode du TDBGrid qui est privée à l'origine.
Pour ce faire, tu crées un nouveau type
Type TDBGridPlus = Class(TDBGrid)
Public
function GetEditText(ACol, ARow: Longint): string; override;
End;
Function TDBGridPlus.GetEditText(ACol, ARow: Longint): string;
Begin
Result := InHerited GetEditText(ACol,ARow);
End;
Un Saludo
|