Christian,
That version is as is with no further update there with existing known bugs.
Next I vaguely remember that version. So this might not actually apply to it :
Asuuming your SQL would be :
select wantedfield 1, wantedfield2, wantedfield3, NOTWANTEDBUTPKID ;
from mytable ;
where Something ;
order by Something
and you want only the wanted* :
-During design time drag&drop one instance from vcx on form.
-Set columncount to 3 (wanted1-3)
-Set headers if you want (assuming not in DBC or you want different - or you want Bolding etc)
-Set colsizes to your taste
-Do NOT set any controlsource or anything else further (would be destroyed)
-Set lKeepFormat to .T.
-Set .cSQL property as :
wantedfield 1, wantedfield2, wantedfield3, NOTWANTEDBUTPKID ;
from mytable ;
where Something ;
order by Something
You could either write this to cSQL in one line or in form.init :
with this.MSelGrid
.cSQL = 'wantedfield 1, wantedfield2, wantedfield3, NOTWANTEDBUTPKID '+;
'from mytable '+;
'where Something '+;
'order by Something'
.Init
endwith
-Set .cSQLSource (reliable only if no join as indicated)
-Run
Hope was working in that version.
Cetin
>Hello Cetin
>
>works perfect
>
>thx
>
>directly another question related to your grid class
>i don't want to display all the fields of the table in my grid
>i've looked in the sourcecode of your class, but due to i'm new to VFP
>i'm a bit confused ..
>i saw that the grid gets all the Header info and column's control sources out of the dbc property's ..
>do I have to rewrite the class to display only the "wanted fields"?
>or could i put in the control sources directly in the grid column object (in designt time)?
>or
>could i just put "select wantedfield 1, wantedfield2, wantedfield3" and so on
>in the cSQL property?
>
>BIG THX
>
>Christian