Reputation: 59
I use three component to save same data : TDBGRid, TDatasource and a MessageTable. I set the edition mode for my DBGrid
MessageDBGrid.Options := MessageDBGrid.Options + [dgEditing];
My question is simple but i can't do that : how can display a DBGrid without any row ? At start, i need to display juste the header for fields.
Upvotes: 0
Views: 668
Reputation: 125630
There is no way to display a DBGrid with zero rows. It will always have one data row, even for an empty table, and even with no datasource assigned it shows an empty row (that is one column wide).
See, for instance, this DBGrid, dropped on a new, blank VCL form in a new, empty VCL application with no other controls:
Upvotes: 2