>DataSource: I selected dataTable1 >ReadOnly: I changed this to True >TableStyles: I clicked the <b>...</b>-button and added a tablestyle > GridColumnStyle: I clicked the <b>...</b>-button and added 16 gridcolumnstyles > For each of the dataGridTextBoxColumns (1-16) I set the Width property to a different value >>
foreach(DataGridColumnStyle dcs in dataGrid1.TableStyles[0].GridColumnStyles) { MessageBox.Show( String.Format ( "Column header:{0}\nColumn source:{1}\nColumn width:{2}", dcs.HeaderText,dcs.MappingName,dcs.Width)); }Check if mappingname (Column Source) is empty or not.