img didnt work. this si second take.
http://img17.imageshack.us/img17/7054/20090306190547.png' border='0'/>
thanks, i now got below code but it has no effect on column width
DataTable dt = new LoadGenres().Load(strFullPathToMyFile).Tables[0]; genreGrid.DataSource = dt;
DataGridTableStyle ts1 = new DataGridTableStyle();
ts1.MappingName = dt.TableName.ToString();
DataGridColumnStyle textCol1 = new DataGridTextBoxColumn();
textCol1.MappingName = dt.Columns[0].ColumnName.ToString();
textCol1.HeaderText = "genre";
textCol1.Width = 300;
ts1.GridColumnStyles.Add(textCol1);
got it with
DataTable myTable = new DataTable(); myTable = new LoadGenres().Load(strFullPathToMyFile).Tables[0]; genreGrid.DataSource = myTable; DataGridTableStyle tableStyle = new DataGridTableStyle(); tableStyle.MappingName = myTable.TableName.ToString(); DataGridTextBoxColumn tbcName = new DataGridTextBoxColumn(); tbcName.Width = Screen.PrimaryScreen.WorkingArea.Width; tbcName.MappingName = myTable.Columns[0].ColumnName.ToString(); //tbcName.HeaderText = myTable.Columns[0].ColumnName.ToString(); tableStyle.GridColumnStyles.Add(tbcName); genreGrid.TableStyles.Clear(); genreGrid.TableStyles.Add(tableStyle);