Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Conexión con bases de datos (https://www.clubdelphi.com/foros/forumdisplay.php?f=2)
-   -   Filtro en dbgrid (https://www.clubdelphi.com/foros/showthread.php?t=77622)

gianfranco_tont 13-02-2012 21:02:30

ya lo logre gracias a tu ayuda.
pero fijate:
Código Delphi [-]
AdoQuerytipo.SQL.Text := 'Select co_tipo,des_tipo From tipo_aju '; // selecciono el nombre de la tabla usuarios
   AdoQuerytipo.Active := True; // activo el sql
   While not AdoQuerytipo.Eof do  // recorro la tabla hasta el final
   begin
     DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[0].Text); // INSERTO EN EL PICKLISI DEL DBGRID LOS DATOS
     AdoQuerytipo.Next; // sigo insertando hasta que encuentre el ultimo
   end;
    AdoQuerytipo.Active := False;  // cierro la consulta
    if ClientDataSet1.State in [dsEdit, dsInsert] then
    end;

dentro de PickList me muestra solo la columna codigo, pero para el usuario el codigo no le dice nada, quisiera que el usuario seleciones por des_tipo pero en el grid se guarde co_tipo.

Sera posible hacer eso o estoy totalemente fuera de lugar?

Caral 13-02-2012 21:03:03

Hola
Por código, en el evento OnShow del form:
Digamos que quieres que la primera columna del dbgrid contenga el combobox y te traiga los datos:
Código Delphi [-]
   DBGrid1.Columns[0].ButtonStyle:= cbsAuto; // boton para combobox en dbgrid
   AdoQuery1.SQL.Text := 'Select Nombre From Usuarios '; // selecciono el nombre de la tabla usuarios
   AdoQuery1.Active := True; // activo el sql
   While not AdoQuery1.Eof do  // recorro la tabla hasta el final
   begin
     DBGrid1.Columns[0].PickList.add(AdoQuery1.Fields[0].Text); // INSERTO EN EL PICKLISI DEL DBGRID LOS DATOS
     AdoQuery1.Next; // sigo insertando hasta que encuentre el ultimo
   end;
   AdoQuery1.Active := False;  // cierro la consulta
Como ves:
1- Se le asigna el boton del combobox al dbgrid.
2- Se hace la consulta a la tabla.
3- Se recorre
4- Se le inserta en la propiedad PICKLIST del dbgrid los datos de la tabla.
5- Se cierra.
Saludos

Caral 13-02-2012 21:07:11

Hola
El Dbgrid tiene una consulta que es la que cargo los datos, verdad ?.
Hoy no traje la bola de cristal, si no la pones no me la imagino.:D:cool:
Saludos

gianfranco_tont 13-02-2012 21:33:47

el dbgrid como dije esta amarrado a un clientdataset por alli contruyo el grid y al terminar los guardo con los datos intruducido por el usuario.

Ahora como dije la opción del picklist es perfecta pero quisiera saber si hay forma de que el picklist me muestre las dos columna de la consulta pero solo me guarde la columna del codigo en el grid.

Caral 13-02-2012 21:36:48

Hola
Donde ?????.
Donde quieres que la guarde ?.
Se puede: SI, SI se puede, si se sabe donde.
Saludos

Caral 13-02-2012 21:40:11

Hola
Muestrame el codigo con el que quieres guardar lo que necesitas.
Saludos

Caral 13-02-2012 21:44:34

Hola
Pregunto:
Cuando hablas de GUARDAR en el Dbgrid hablas de MOSTRAR ????.
Saludos

gianfranco_tont 13-02-2012 21:59:29

no! uso el dbgrid para atravez del clientdataset me proveea una tabla temporal para luego al finalizar guardar la informacion en la tabla correspodiente. el picklist lo necesito para armar la informacion del tada set,te explico es como un from de factura. Armo el detalle de la factura y luego la guardo.

gianfranco_tont 13-02-2012 22:04:13

Código Delphi [-]
AdoQuerytipo.SQL.Text := 'Select co_tipo,des_tipo From tipo_aju '; // selecciono el nombre de la tabla usuarios
   AdoQuerytipo.Active := True; // activo el sql
   While not AdoQuerytipo.Eof do  // recorro la tabla hasta el final
   begin
     DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[0].Text); // INSERTO EN EL PICKLISI DEL DBGRID LOS DATOS
     AdoQuerytipo.Next; // sigo insertando hasta que encuentre el ultimo
   end;
    AdoQuerytipo.Active := False;  // cierro la consulta
    if ClientDataSet1.State in [dsEdit, dsInsert] then
Fijate en el select estoy cargando la informacion en el picklist 'Select co_tipo,des_tipo From tipo_aju' pero en el picklist solo puedo selecionar una forma de guardar ' DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[0]' aunque puedo escojer entre .Fields[0] y el .Fields[1], yo quiero que se vean ambos pero al selecionar la linea en el picklist solo me pase al grid o client data set el .Fields[0],

gianfranco_tont 13-02-2012 22:10:30

te mando el codigo completo para ver si me puedes ayudar tambien porque cuando salgo del from se me queda colgado el programa creo que tiene algo que ver con el clientdata set edit o incert.

Código Delphi [-]
unit Unitajuste;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ADODB, Provider, DBClient, Grids, DBGrids, StdCtrls, ToolWin,
  ActnMan, ActnCtrls, Ribbon, RibbonLunaStyleActnCtrls, Buttons, pngimage,
  ExtCtrls, ActnList, ImgList, PlatformDefaultStyleActnCtrls, ComCtrls, Menus,
  DBCtrls;
  const
  nif_info = $10;

type
tnotifyicons = (niif_none, niif_info, niif_warning, niif_error, niif_user);
    TFormAjuste = class(TForm)
    Ribbon1: TRibbon;
    RibbonPage1: TRibbonPage;
    RibbonGroup1: TRibbonGroup;
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Label1: TLabel;
    Edit2: TEdit;
    Label2: TLabel;
    Edit3: TEdit;
    Label3: TLabel;
    DataSetProvider1: TDataSetProvider;
    ClientDataSet1: TClientDataSet;
    ADOTable1: TADOTable;
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    Edit4: TEdit;
    Image1: TImage;
    Label4: TLabel;
    Image2: TImage;
    Label5: TLabel;
    Image3: TImage;
    Label6: TLabel;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    SpeedButton3: TSpeedButton;
    BalloonHint1: TBalloonHint;
    TrayIcon1: TTrayIcon;
    ActionManager1: TActionManager;
    ImageList1: TImageList;
    ActionToolBar1: TActionToolBar;
    Action1: TAction;
    Action2: TAction;
    ADOQueryenc_aju: TADOQuery;
    ADOQueryenc_ajuajue_num: TIntegerField;
    ADOQueryenc_ajufecha: TDateTimeField;
    ADOQueryenc_ajumotivo: TStringField;
    ADOQueryenc_ajutotal: TFMTBCDField;
    ADOQueryenc_ajuseriales: TIntegerField;
    ADOQueryenc_ajufeccom: TDateTimeField;
    ADOQueryenc_ajunumcom: TIntegerField;
    ADOQueryenc_ajutasa: TFMTBCDField;
    ADOQueryenc_ajumoneda: TStringField;
    ADOQueryenc_ajudis_cen: TMemoField;
    ADOQueryenc_ajucampo1: TStringField;
    ADOQueryenc_ajucampo2: TStringField;
    ADOQueryenc_ajucampo3: TStringField;
    ADOQueryenc_ajucampo4: TStringField;
    ADOQueryenc_ajucampo5: TStringField;
    ADOQueryenc_ajucampo6: TStringField;
    ADOQueryenc_ajucampo7: TStringField;
    ADOQueryenc_ajucampo8: TStringField;
    ADOQueryenc_ajuco_us_in: TStringField;
    ADOQueryenc_ajufe_us_in: TDateTimeField;
    ADOQueryenc_ajuco_us_mo: TStringField;
    ADOQueryenc_ajufe_us_mo: TDateTimeField;
    ADOQueryenc_ajuco_us_el: TStringField;
    ADOQueryenc_ajufe_us_el: TDateTimeField;
    ADOQueryenc_ajurevisado: TStringField;
    ADOQueryenc_ajutrasnfe: TStringField;
    ADOQueryenc_ajuco_sucu: TStringField;
    ADOQueryenc_ajurowguid: TGuidField;
    ADOQueryenc_ajuanulada: TBooleanField;
    ADOQueryenc_ajuaux01: TFMTBCDField;
    ADOQueryenc_ajuaux02: TStringField;
    ADOQueryenc_ajuproduccion: TBooleanField;
    ADOQueryenc_ajuimp_num: TIntegerField;
    ADOQueryenc_ajufact_num: TIntegerField;
    StatusBar1: TStatusBar;
    PopupMenu1: TPopupMenu;
    ADOQuery1: TADOQuery;
    ADOQuery1co_art: TStringField;
    ADOQuery1art_des: TStringField;
    ADOQuery1fecha_reg: TDateTimeField;
    ADOQuery1manj_ser: TBooleanField;
    ADOQuery1co_lin: TStringField;
    ADOQuery1co_cat: TStringField;
    ADOQuery1co_subl: TStringField;
    ADOQuery1co_color: TStringField;
    ADOQuery1item: TStringField;
    ADOQuery1ref: TStringField;
    ADOQuery1modelo: TStringField;
    ADOQuery1procedenci: TStringField;
    ADOQuery1comentario: TMemoField;
    ADOQuery1co_prov: TStringField;
    ADOQuery1ubicacion: TStringField;
    ADOQuery1uni_venta: TStringField;
    ADOQuery1uni_compra: TStringField;
    ADOQuery1uni_relac: TFMTBCDField;
    ADOQuery1relac_aut: TIntegerField;
    ADOQuery1stock_act: TFMTBCDField;
    ADOQuery1stock_com: TFMTBCDField;
    ADOQuery1sstock_com: TFMTBCDField;
    ADOQuery1stock_lle: TFMTBCDField;
    ADOQuery1sstock_lle: TFMTBCDField;
    ADOQuery1stock_des: TFMTBCDField;
    ADOQuery1sstock_des: TFMTBCDField;
    ADOQuery1suni_venta: TStringField;
    ADOQuery1suni_compr: TStringField;
    ADOQuery1suni_relac: TBCDField;
    ADOQuery1sstock_act: TFMTBCDField;
    ADOQuery1relac_comp: TFMTBCDField;
    ADOQuery1relac_vent: TFMTBCDField;
    ADOQuery1pto_pedido: TFMTBCDField;
    ADOQuery1stock_max: TFMTBCDField;
    ADOQuery1stock_min: TFMTBCDField;
    ADOQuery1prec_om: TBooleanField;
    ADOQuery1prec_vta1: TFMTBCDField;
    ADOQuery1fec_prec_v: TDateTimeField;
    ADOQuery1fec_prec_2: TDateTimeField;
    ADOQuery1prec_vta2: TFMTBCDField;
    ADOQuery1fec_prec_3: TDateTimeField;
    ADOQuery1prec_vta3: TFMTBCDField;
    ADOQuery1fec_prec_4: TDateTimeField;
    ADOQuery1prec_vta4: TFMTBCDField;
    ADOQuery1fec_prec_5: TDateTimeField;
    ADOQuery1prec_vta5: TFMTBCDField;
    ADOQuery1prec_agr1: TFMTBCDField;
    ADOQuery1prec_agr2: TFMTBCDField;
    ADOQuery1prec_agr3: TFMTBCDField;
    ADOQuery1prec_agr4: TFMTBCDField;
    ADOQuery1prec_agr5: TFMTBCDField;
    ADOQuery1can_agr: TFMTBCDField;
    ADOQuery1fec_des_p5: TDateTimeField;
    ADOQuery1fec_has_p5: TDateTimeField;
    ADOQuery1co_imp: TStringField;
    ADOQuery1margen_max: TBCDField;
    ADOQuery1ult_cos_un: TFMTBCDField;
    ADOQuery1fec_ult_co: TDateTimeField;
    ADOQuery1cos_pro_un: TFMTBCDField;
    ADOQuery1fec_cos_pr: TDateTimeField;
    ADOQuery1cos_merc: TFMTBCDField;
    ADOQuery1fec_cos_me: TDateTimeField;
    ADOQuery1cos_prov: TFMTBCDField;
    ADOQuery1fec_cos_p2: TDateTimeField;
    ADOQuery1ult_cos_do: TFMTBCDField;
    ADOQuery1fec_cos_do: TDateTimeField;
    ADOQuery1cos_un_an: TFMTBCDField;
    ADOQuery1fec_cos_an: TDateTimeField;
    ADOQuery1ult_cos_om: TFMTBCDField;
    ADOQuery1fec_ult_om: TDateTimeField;
    ADOQuery1cos_pro_om: TFMTBCDField;
    ADOQuery1fec_pro_om: TDateTimeField;
    ADOQuery1tipo_cos: TStringField;
    ADOQuery1mont_comi: TBCDField;
    ADOQuery1porc_cos: TBCDField;
    ADOQuery1mont_cos: TBCDField;
    ADOQuery1porc_gas: TBCDField;
    ADOQuery1mont_gas: TBCDField;
    ADOQuery1f_cost: TDateTimeField;
    ADOQuery1fisico: TBooleanField;
    ADOQuery1punt_cli: TBCDField;
    ADOQuery1punt_pro: TBCDField;
    ADOQuery1dias_repos: TIntegerField;
    ADOQuery1tipo: TStringField;
    ADOQuery1alm_prin: TStringField;
    ADOQuery1anulado: TBooleanField;
    ADOQuery1tipo_imp: TStringField;
    ADOQuery1dis_cen: TMemoField;
    ADOQuery1mon_ilc: TFMTBCDField;
    ADOQuery1capacidad: TBCDField;
    ADOQuery1grado_al: TBCDField;
    ADOQuery1tipo_licor: TStringField;
    ADOQuery1compuesto: TBooleanField;
    ADOQuery1picture: TBlobField;
    ADOQuery1campo1: TStringField;
    ADOQuery1campo2: TStringField;
    ADOQuery1campo3: TStringField;
    ADOQuery1campo4: TStringField;
    ADOQuery1campo5: TStringField;
    ADOQuery1campo6: TStringField;
    ADOQuery1campo7: TStringField;
    ADOQuery1campo8: TStringField;
    ADOQuery1co_us_in: TStringField;
    ADOQuery1fe_us_in: TDateTimeField;
    ADOQuery1co_us_mo: TStringField;
    ADOQuery1fe_us_mo: TDateTimeField;
    ADOQuery1co_us_el: TStringField;
    ADOQuery1fe_us_el: TDateTimeField;
    ADOQuery1revisado: TStringField;
    ADOQuery1trasnfe: TStringField;
    ADOQuery1co_sucu: TStringField;
    ADOQuery1rowguid: TGuidField;
    ADOQuery1tuni_venta: TStringField;
    ADOQuery1equi_uni1: TFMTBCDField;
    ADOQuery1equi_uni2: TFMTBCDField;
    ADOQuery1equi_uni3: TFMTBCDField;
    ADOQuery1lote: TBooleanField;
    ADOQuery1serialp: TStringField;
    ADOQuery1valido: TBooleanField;
    ADOQuery1atributo1: TBooleanField;
    ADOQuery1vatributo1: TStringField;
    ADOQuery1atributo2: TBooleanField;
    ADOQuery1vatributo2: TStringField;
    ADOQuery1atributo3: TBooleanField;
    ADOQuery1vatributo3: TStringField;
    ADOQuery1atributo4: TBooleanField;
    ADOQuery1vatributo4: TStringField;
    ADOQuery1atributo5: TBooleanField;
    ADOQuery1vatributo5: TStringField;
    ADOQuery1atributo6: TBooleanField;
    ADOQuery1vatributo6: TStringField;
    ADOQuery1garantia: TStringField;
    ADOQuery1peso: TFMTBCDField;
    ADOQuery1pie: TFMTBCDField;
    ADOQuery1margen1: TBCDField;
    ADOQuery1margen2: TBCDField;
    ADOQuery1margen3: TBCDField;
    ADOQuery1margen4: TBCDField;
    ADOQuery1margen5: TBCDField;
    ADOQuery1row_id: TBytesField;
    ADOQuery1imagen1: TStringField;
    ADOQuery1imagen2: TStringField;
    ADOQuery1i_art_des: TStringField;
    ADOQuery1uni_emp: TStringField;
    ADOQuery1rel_emp: TFMTBCDField;
    ADOQuery1movil: TBooleanField;
    ADOQuery1tot_costo: TFMTBCDField;
    ADOQuerytipo: TADOQuery;
    ADOQuerycodigo: TADOQuery;
    DataSourcecodigo: TDataSource;
    ADOTable1ajue_num: TIntegerField;
    ADOTable1reng_num: TIntegerField;
    ADOTable1art_desc: TMemoField;
    ADOTable1tipo: TStringField;
    ADOTable1co_art: TStringField;
    ADOTable1total_art: TFMTBCDField;
    ADOTable1uni_compra: TStringField;
    ADOTable1stotal_art: TFMTBCDField;
    ADOTable1suni_compr: TStringField;
    ADOTable1co_alma: TStringField;
    ADOTable1cost_unit_om: TFMTBCDField;
    ADOTable1cost_unit: TFMTBCDField;
    ADOTable1feccom: TDateTimeField;
    ADOTable1numcom: TIntegerField;
    ADOTable1uni_venta: TStringField;
    ADOTable1suni_venta: TStringField;
    ADOTable1cos_pro_un: TFMTBCDField;
    ADOTable1ult_cos_om: TFMTBCDField;
    ADOTable1cos_pro_om: TFMTBCDField;
    ADOTable1rowguid: TGuidField;
    ADOTable1total_uni: TFMTBCDField;
    ADOTable1nro_lote: TStringField;
    ADOTable1fec_lote: TDateTimeField;
    ADOTable1pendiente2: TFMTBCDField;
    ADOTable1tipo_doc2: TStringField;
    ADOTable1reng_doc2: TIntegerField;
    ADOTable1num_doc2: TIntegerField;
    ADOTable1aux01: TFMTBCDField;
    ADOTable1aux02: TStringField;
    ADOTable1mo_cant: TFMTBCDField;
    ADOTable1gf_cant: TFMTBCDField;
    ADOTable1mo_cant_om: TFMTBCDField;
    ADOTable1gf_cant_om: TFMTBCDField;
    ADOTable1produccion: TBooleanField;
    ADOTable1Total: TFMTBCDField;
    ClientDataSet1ajue_num: TIntegerField;
    ClientDataSet1reng_num: TIntegerField;
    ClientDataSet1art_desc: TMemoField;
    ClientDataSet1tipo: TStringField;
    ClientDataSet1co_art: TStringField;
    ClientDataSet1total_art: TFMTBCDField;
    ClientDataSet1uni_compra: TStringField;
    ClientDataSet1stotal_art: TFMTBCDField;
    ClientDataSet1suni_compr: TStringField;
    ClientDataSet1co_alma: TStringField;
    ClientDataSet1cost_unit_om: TFMTBCDField;
    ClientDataSet1cost_unit: TFMTBCDField;
    ClientDataSet1feccom: TDateTimeField;
    ClientDataSet1numcom: TIntegerField;
    ClientDataSet1uni_venta: TStringField;
    ClientDataSet1suni_venta: TStringField;
    ClientDataSet1cos_pro_un: TFMTBCDField;
    ClientDataSet1ult_cos_om: TFMTBCDField;
    ClientDataSet1cos_pro_om: TFMTBCDField;
    ClientDataSet1rowguid: TGuidField;
    ClientDataSet1total_uni: TFMTBCDField;
    ClientDataSet1nro_lote: TStringField;
    ClientDataSet1fec_lote: TDateTimeField;
    ClientDataSet1pendiente2: TFMTBCDField;
    ClientDataSet1tipo_doc2: TStringField;
    ClientDataSet1reng_doc2: TIntegerField;
    ClientDataSet1num_doc2: TIntegerField;
    ClientDataSet1aux01: TFMTBCDField;
    ClientDataSet1aux02: TStringField;
    ClientDataSet1mo_cant: TFMTBCDField;
    ClientDataSet1gf_cant: TFMTBCDField;
    ClientDataSet1mo_cant_om: TFMTBCDField;
    ClientDataSet1gf_cant_om: TFMTBCDField;
    ClientDataSet1produccion: TBooleanField;
    ClientDataSet1Total: TFMTBCDField;
    SpeedButton4: TSpeedButton;
    ADOQuerytipoco_tipo: TStringField;
    ADOQuerytipodes_tipo: TStringField;
    procedure Edit2DblClick(Sender: TObject);
    procedure Action2Execute(Sender: TObject);
    procedure FormShow(Sender: TObject);


  private
  FFIeldName: string;
    { Private declarations }
  public
    { Public declarations }
  end;
 Const
   coma = #39;

var
  FormAjuste: TFormAjuste;

implementation
Uses unit1,unitlistajuste;

{$R *.dfm}

procedure TFormAjuste.Action2Execute(Sender: TObject);
begin
    FormLISTAJUSTE.Show;
end;

procedure TFormAjuste.Edit2DblClick(Sender: TObject);
begin
      edit2.ReadOnly := False;
end;

procedure TFormAjuste.FormShow(Sender: TObject);
begin
   AdoQuerytipo.SQL.Text := 'Select co_tipo || des_tipo || From tipo_aju '; // selecciono el nombre de la tabla usuarios
   AdoQuerytipo.Active := True; // activo el sql
   While not AdoQuerytipo.Eof do  // recorro la tabla hasta el final
   begin
     DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[0].Text); // INSERTO EN EL PICKLISI DEL DBGRID LOS DATOS
     AdoQuerytipo.Next; // sigo insertando hasta que encuentre el ultimo
   end;
    AdoQuerytipo.Active := False;  // cierro la consulta
    if ClientDataSet1.State in [dsEdit, dsInsert] then
    end;

end.

Caral 13-02-2012 22:23:02

Hola
Dos campos en el combobox del dbgrid:
Columna 1, que es en realidad la segunda columna del dbgrid.
Ejemplo 1: Datos seguidos:
Código Delphi [-]
   AdoQuerytipo.SQL.Text := 'Select co_tipo, des_tipo From tipo_aju '; 
   AdoQuerytipo.Active := True; 
   While not AdoQuerytipo.Eof do  
   begin
     DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[0].Text+'     '+AdoQuerytipo.Fields[1].Text); 
     AdoQuerytipo.Next; 
   end;
    AdoQuerytipo.Active := False;

Ejemplo 2: Uno arriba del otro:

Código Delphi [-]
   AdoQuerytipo.SQL.Text := 'Select co_tipo, des_tipo From tipo_aju '; 
   AdoQuerytipo.Active := True; 
   While not AdoQuerytipo.Eof do  
   begin
     DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[0].Text); 
     DBGrid1.Columns[1].PickList.add(AdoQuerytipo.Fields[1].Text); 
     AdoQuerytipo.Next; 
   end;
    AdoQuerytipo.Active := False;

Es eso ?.
Saludos

gianfranco_tont 13-02-2012 23:37:54

finalmente desisti estoy utilizando cbsEllipsis y un oneditbutooclick le estoy colocando un
Código Delphi [-]
ShowModal = mrOk then
en el otro from y perfecto al selecionar una linea en el grid donde hago la consulta me trae la informacion que quiero y en donde la quiero y hasta alli todo perfecto:

pero como hago si tengo varias celdas donde colocar el cbsEllipsis y cada una de ella debe llamarme un from diferente?

Caral 14-02-2012 01:00:18

Hola
No entiendo.
Creo que, a mi modo de ver, lo mejor seria que te olvidaras del dbgrid e hicieras todo con un stringgrid, es mucho mas manejable para lo que tiene que ver con introducir datos por linea, osea, una factura.
Saludos

gianfranco_tont 14-02-2012 01:15:14

debe haber algo que pueda solucionar esta situacion, de verdad veo muchos programas que hacen lo mismo, ahora no se como utilizar este componente voy a investigar a ver si puedo solucionarlo.

oye de verdad gracias por tu ayuda de verdad te quite mucho tiempo.

Caral 14-02-2012 01:24:33

Hola
No te preocupes por el tiempo, si no me apeteciera no lo daría.
Lastima que cuando empezáis a programar os liéis con BD que no son fáciles de transportar.
Por eso siempre recomiendo empezar con access y luego hacer el cambio a otra bd, es mas fácil ayudar si se puede tener el programa y ver lo que se necesita hacer.
Saludos

Caral 15-02-2012 02:23:24

Hola
Bueno, pensando en esto creo entender lo que quieres hacer.
1- Tienes un dbgrid vacío.
2- Tienes un botón o combobox (el que sea) el que contiene la información de uno o varios campos de una tabla.
3- Quieres que cuando se seleccione un dato de los mostrados (en los anteriores) te llene otros datos en la fila correspondiente en ese mismo dbgrid.
4- hacer de todo esto una especie de lista que se vera en el dbgrid.
Si es asi, me dices y lo vemos.
Saludos


La franja horaria es GMT +2. Ahora son las 08:43:00.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi