Yes, you are right. When you checking every record in remote table it
can take a months. I think about a procedure witch I can call AFTER
putting  all data in.  I do not want automagicaly engine witch do than
on the flay. You now:
Dataset.Open;
Dataset.Append;
Dataset.Post;
dbGrid.AdjustColumns or other function...
And I have a proper width to next update or append. This is no elegant
solution but it should work I think.

I use a SQLite and tables do not contain a valid length information.
Problem is the tables (databases) I use are 3-4 years old and contains
10000-250000 rows. Previously I use a TCL/TK but I do not find this as
"elegant" solution. I love Lazarus very much but there are few
thinks... :).
By the time my workaround is to query database, put rows to stringGrid
and do AutoAdjustColumns. But it is no RAD solution and require much
more lines of code. More than in TCL... dbControls works great if you
are have all information before coding :).

Regards

Michal




I guess dbGrid is descendant StringGrid and internally stores all cell
as Strings.   

Dnia 26-09-2005, pon o godzinie 12:05 -0500, Jesus Reyes napisał(a):
> It's automatic, when you add a new column and then you set the
> fieldname column's property, the column gets resized according to the
> field specification (Field display width, or column's title the
> bigger it's used)
> 
> An automatic resize based in cell content like in TStringGrid still
> it's possible but it needs check every record in the dataset, for
> small datasets maybe it's not a problem but for big ones, retrieved
> from remote servers it's not an option. And the problem is that
> dbgrid doesn't knowbefore hand what kind of database is attached to.
> 
> Based in the premise that the user 'knows' I could add a function
> that retrieve every record in the database and then it can get a best
> fit for column width. What do other think about this, it's a good
> idea?
> 
> Jesus Reyes A.
> 
> 
>  --- Micha³ Wojtaszek <[EMAIL PROTECTED]> escribió:
> 
> > eeee.... ekhm, ekhm.... only one thing... witch function I should
> > use to
> > do that? 
> > 
> > Sorry
> > 
> > Michal
> > 
> >
> 
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
> Regístrate ya - http://correo.yahoo.com.mx/ 
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to