Hola a todos(a),
en el key down del dbgrid esto es lo tengo:
Código PHP:
if (Key = VK_DOWN) or
( (Key = VK_TAB) and
(DBGrid1.SelectedIndex = DbGrid1.Columns.Count+1) ) then
begin
with (Sender as TDbGrid).DataSource.DataSet do
begin
DisableControls;
Next;
if EOF then Key := 0 else Tbl_Detalle.Next;
EnableControls;
end;
y en el on key press de la form, tengo lo siguiente:
Código PHP:
if Key = #13 then
if not (ActiveControl is TDBGrid) then begin
Key := #0;
Perform(WM_NEXTDLGCTL, 0, 0);
end
else
if (ActiveControl is TDBGrid) then
with TDBGrid(ActiveControl) do
if selectedindex < (fieldcount -1) then
selectedindex := selectedindex +1
else
begin
selectedindex := 0;
Dts_Detalle.DataSet.Next;
end;
y resulta que cuando estoy adicionando se oculta la linea anterior, si por favor me pueden dar una manito
Alcides
Rep.Dom.