Re: Lookupfields in grid.. Disappear and reappear :S
From: Arnoud van Bers (avbers_at_
Date: 04/20/04
- Next message: Neil Joyce: "Retrieving a memo field from access."
- Previous message: Warren: "ADO + ClientDataSet + Sybase = no Time fields"
- In reply to: Vitali Kalinin: "Re: Lookupfields in grid.. Disappear and reappear :S"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Apr 2004 15:56:33 +0200
Well,
changing the SQL is not an option, because it is generated runtime.
Furthermore will I have to have it editable in another view..
Hope it can be fixed another way...
More suggestions?
"Vitali Kalinin" <vitkalinin@yahoo.com> wrote in message
news:40851826@newsgroups.borland.com...
> Borland ADO wrapper have known problem with lookup fields. As far as I see
> from your code you don't want lookup values to be editable, thus I suggest
> you to modify underlying SQL of mySP in order to perform lookuping on
server
> side.
>
> Regards,
> Vitali
> "Arnoud van Bers xlned.com>" <avbers@<REMOVE4SPAM> сообщил/сообщила в
> новостях следующее: news:4084f113$1@newsgroups.borland.com...
> > Hi There,
> >
> > I suffer from a vague problem:
> > For lookupfields in a dbgrid I use a (parameterised) query, which
executes
> > fine but doesn't always show up in a grid...
> >
> > When opening the grid, I see the following (NOT CORRECT)
> > Watch the first column:
> >
> > http://web10.ontwikkeling.ica.han.nl/1.gif
> >
> > After scrolling to the end and to the beginning again, I get the
following
> > result (CORRECT)
> >
> > http://web10.ontwikkeling.ica.han.nl/2.gif
> >
> > Suddenly all records are visible..
> > At first I thought it would be a repaint or doublebuffering problem..
this
> > is not the case!
> >
> > Code:
> >
> >
> > myFKQuery := TADOQuery.Create(myGrid);
> > with myFKQuery do
> > begin
> > Connection := DataMod.DBConn;
> > DataSource := myGrid.Datasource;
> > (Can this be a problem? It is absolutely necessary)
> > CacheSize := 30;
> > SQL.Text := DataMod.cdsColumns.Fields[24].AsString;
> > end;
> >
> > with TStringField.Create(mySP) do
> > begin
> > ReadOnly := TRUE;
> > mySP.Fields[k].Visible := FALSE;
> > FieldName := myGrid.DataSource.DataSet.Fields[k].FieldName+'_';
> > FieldKind:= fkLookup;
> > DataSet := mySP;
> > if DataMod.cdsColumns.Fields[2].AsString <> '' then DisplayLabel :=
> > DataMod.cdsColumns.Fields[2].AsString;
> > Name := FieldName;
> > KeyFields:= mySP.Fields[k].FieldName;
> > ReadOnly := TRUE;
> > Size := 300;
> > LookUpDataset:= myFKQuery
> > LookUpKeyFields:= DataMod.cdsColumns.Fields[22].AsString;
> > LookUpResultField:= mySL.Strings[0];
> > mySP.FieldDefs.Add(Name, ftString, 300, false);
> >
> >
> >
> > The query is a parameterised query:
> >
> > SELECT OPLSAMENSTEL.* FROM OPLSAMENSTEL,MODULE B WHERE
> > OPLSAMENSTEL.MODULEOPL=B.CODEMODULE and OPLEIDING = :OPLEIDING
> >
> > Can somebody explain this to me? (and have a solution?? :P)
> >
> > Greetz,
> > Arnoud van Bers
> >
> > The Netherlands
> >
> >
>
>
- Next message: Neil Joyce: "Retrieving a memo field from access."
- Previous message: Warren: "ADO + ClientDataSet + Sybase = no Time fields"
- In reply to: Vitali Kalinin: "Re: Lookupfields in grid.. Disappear and reappear :S"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|