Home Forums WinForms controls Xceed Grid for WinForms Problem on dynamically creating a GridControl Reply To: Problem on dynamically creating a GridControl

User (Old forums)
Post count: 23064

There seems to be something problematic in your project, because it should work fine to bind to a DataTable, and if you do not set the AutoCreateColumns, it should display all the columns included in the DataTable.  This is what I used when I mentioned I had tested this on our side.

In the last snippet, you seems to be mixing the DataSet with the DataTable.  You should use one or the other.


grid.DataSource = dataSet;

grid.DataMember = “nameOfTable”;


grid.DataSource = dataTable;

grid.DataMember = dataTable.TableName;

Imported from legacy forums. Posted by André (had 403 views)