--- "Bob K." <[EMAIL PROTECTED]> escribió:

>             ZTableGeneric.TableName:='CHEMICAL'; 
>             ZTableGeneric.SortedFields:='CHEMICAL'; 
>             ZTableGeneric.Active:=True; 
>             with DBGridGeneric do 
>               begin 
>                 for i:=0 to Columns.Count-1 do 
>                   if Columns[i].Title.Caption='CHEMICALID' then 
>                     Columns[i].Visible:=False; 
>[1]                 if Columns[i].Title.Caption='CHEMICAL' then 
>                     begin 
>                       Columns[i].Title.Caption:='Chemical'; 
>                       Columns[i].Visible:=True; 

> bob k.> _______________________________________________

Setting dataset active to true when it's true doesn't make it
retrieve field set again, testing for uppercase CHEMICAL the first
time it's ok but as column's caption is changed to a different case
next time the test will fail, try in [1]: if
comparetext(Columns[i].Title.Caption,'CHEMICAL')=0 then 

Jesus Reyes A.


      
____________________________________________________________________________________
Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008! Entérate aquí 
http://deportes.yahoo.com
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to