Dbgrid auto fit to shape

I used DBGrid in BDS 2006. It has 6 columns that get populated at runtime. The datatype for one column is char (150) in mysql database. because when fetching from database in dbgrid it needs length and columns get wider with scrollbar and some coloumns stay hidden. so my question is how to fit these coloumns dbgrid to form?


source to share

1 answer

You can use the free JVCL JEDI Visual Component Library

Use TJvDBGrid and set AutoSizeColumn to True. All this will allow the columns to fit the width of the DBGrid and not show the horizontal scrollbar.



All Articles