Datagrid

  • Thread starter Thread starter Otto Atzwanger
  • Start date Start date
O

Otto Atzwanger

How to set Datagrid Column width?
Is there somewhere an example?
Thanks in advance

Otto
 
Otto,

DataGridTableStyle oStyle = new DataGridTableStyle();
DataGridTextBoxColumn oCity = new DataGridTextBoxColumn();
oCity.HeaderText = "Ort";
oCity.MappingName = "SUPPL_CITY";
oCity.Width = 90;
oStyle.GridColumnStyles.Add( oCity );

......
// add more columns
......

dataGridSuppl.TableStyles.Clear();
dataGridSuppl.TableStyles.Add( oStyle );
dataGridSuppl.RowHeadersVisible = false;

HTH
Ruediger


How to set Datagrid Column width?
Is there somewhere an example?
Thanks in advance

Otto
 
Back
Top