You can generate the GridViewColumns for the ListView programatically and apply the binding to that. Loop through the columns in the DataSet and add a corresponding GridViewColumn into the ListView.
var gridView = (GridView)list.View;
foreach(var col in table.Columns) {
gridView.Columns.Add(new GridViewColumn{
Header=col.ColumnName,
DisplayMemberBinding=new Binding(col.ColumnName)});
}
Steven
2009-05-12 17:32:04