user1071339
user1071339

Reputation:

dbgrid autofit to a form

I have used DBGrid in BDS 2006.It has 6 columns which are populated during runtime. The datatype for for one column is char(150) in mysql database. since while retriving from database to dbgrid it takes the length and the columns become wider with a scroll bar and some coloumns remain hidden. so my question is how to fit these coloumns of the dbgrid to the form?

Upvotes: 3

Views: 844

Answers (1)

Justmade
Justmade

Reputation: 1496

You can use the free JVCL JEDI Visual Component Library

Use the TJvDBGrid and set AutoSizeColumn to True. It will all allow the columns to fit for the DBGrid width and show no horizontal scroll bar.

Upvotes: 2

Related Questions