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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top