Page 1 of 1

OFF topic : How can I change the fields name in DBGrid

Posted: 19.05.2009, 20:31
by rgkx
hi guys ,

I´m using lazarus and zeos db and I was wondering how can I change the default fields names that DBGrid take from the table ?

Is there an advanced DBgrid Tcomponent to use in lazarus ?

Thanks ,

Regards ,

Posted: 19.05.2009, 21:17
by mdaems
Can't you just set them using the IDE? Just double click the grid name in the object inspector tree and you can select the columns. Then you can set column properties.

Mark

Posted: 19.05.2009, 21:18
by trupka
2 ways to do it:
1.) double click on ZTable/Z*Query opens fields editor. Right click inside and Add fields. Click on field of choice and in object inspector change DisplayLabel property.
2.) right click on TDBGrid and then Edit columns... opens column editor. Add as many columns as needed and for each column fill-in FieldName and Title.Caption propert in obj. insp.