![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#3
|
|||
|
|||
|
Cita:
Código:
procedure TF_Vendes.JvDBUltimGrid1ColExit(Sender: TObject);
begin
if F_ModulDades.LVentas.State in [dsEdit, dsInsert] then
begin
if JvDBUltimGrid1.SelectedField.FieldName = 'UNIDADES' then
begin
F_ModulDades.Stock_Unidades.Close;
F_ModulDades.Stock_Unidades.ParamByName('REFERENCIA').AsString := F_ModulDades.LVentasREFERENCIA.Value;
F_ModulDades.Stock_Unidades.Open;
if F_ModulDades.LVentasUNIDADES.Value > F_ModulDades.Stock_UnidadesSTOCK.Value then
begin
ShowMessage('Estás vendiendo más unidades de las que hay en stock, solo puedes vender ' + IntToStr(F_ModulDades.Stock_UnidadesSTOCK.Value) + ' unidades.');
F_ModulDades.LVentas.Edit;
F_ModulDades.LVentasUNIDADES.Clear;
F_ModulDades.LVentas.Post;
JvDBUltimGrid1.SetFocus; // Establecer foco en JvDBUltimGrid1 (puedes intentar utilizar JvDBUltimGrid1.SetFocusCell(ACol, ARow) si es necesario)
JvDBUltimGrid1.SelectedIndex := JvDBUltimGrid1.Columns.IndexOf('UNIDADES'); // Establecer el índice de columna seleccionada
// Desactivar y reactivar el control JvDBUltimGrid1
JvDBUltimGrid1.Enabled := False;
JvDBUltimGrid1.Enabled := True;
end;
end;
end;
end;
|
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| campo en memoria para grid | Rofocale | Varios | 11 | 22-05-2011 09:36:43 |
| Campo Calculado en JvDBUltim Grid | mantraxer21 | Varios | 1 | 27-08-2010 17:52:35 |
| Como dar foco en un campo del registro activo TDBGrilla | kikodelphi | MS SQL Server | 1 | 19-05-2005 15:58:39 |
| Mostrar un campo clob en un grid | Lix | Oracle | 5 | 27-02-2004 20:48:57 |
| problema con string grid (desparece el contenido de la celda al perder el foco) | sase | Varios | 0 | 20-08-2003 18:37:59 |
|