Hi
How do I can Change the Column width and Caption of a DataGrid in my Program
and also how do I can change the Height of a Row of a DataGrid

Hi
How do I can Change the Column width and Caption of a DataGrid in my Program
and also how do I can change the Height of a Row of a DataGrid

for Column width and caption change appropriate properties of underlying dataset fields. eg. NameField.DisplayWidth:=.. NameField.DisplayLabel:=.. dont sure about height. Maybe you can change it from Datagrid properties but dont remember whether it is public property or not.

I can not find DisplayLabel or DisplayWidth in DataSet

var ds : DataSet;
Begin
ds.???

or

DataGrid1.????

I can not find DisplayLabel or DisplayWidth in DataSet

var ds : DataSet;
Begin
ds.???

or

DataGrid1.????

Dataset "Fields" not Dataset. PersonGrid : TDBGrid; PersonTable : TDataset; PersonSource : TDataSource; PersonTable.FieldByName('Surname').DisplayWidth:= ... or PersonGrid.DataSource.Dataset.FieldByName('Surname').DisplayWidth

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.