How to Define width for daatatable column

  • Thread starter Thread starter karunakar
  • Start date Start date
K

karunakar

Iam binding datagrid using Datatable .

How to define width for Datagrid header

dt.Columns.Add(new DataColumn("IntegerValue", typeof(Int32)));

using this i was populating datagrid

Regards

Venu
 
Venu,

You can set the PreferredColumnWidth property of the DataGrid. This would
make all columns the same size (in pixels).
One way to set the width of a specific column,is to add a TableStyle with
ColumnsStyles to your DataGrid and then set the Width property of the chosen
column through its ColumnStyle.

For further help you can check:
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx

Hope it helps

Vinicius
 
Back
Top