>> I try to bind a DataTable to a DataGrid, but I receive
the following error-message :
'The IListSource does not contain any data sources'.
I have no clue what the problem might be, as I can tell that
the DataTable actually contains valid data. This is the code :
DataTable dtUserlist = new CoreTasks().selectUsers();
showContent(dtUserlist); // Proves that the DataTable contains data.
dgTasks.DataSource = dtUserlist;
dgTasks.DataBind(); // Error on this line.
I have already searched a lot on this, but to no avail.
Who can point me in the right direction ?
Does this work on just a plain grid with nothing customized?
I will try that.
Do you have any code that happens on databinding, etc.
I don't understand what you mean by that. As you can see in my code
snippet, I have a class which provides a filled DataTable, just before
I try to bind it.
The test-method 'showContent(dtUserlist)' proves that the DataTable
really contains data, so how could the data-binding possible fail ?
I have several other similair DataGrids in my project, they all work fine.
The only difference here is, that this DataGrid is in a modal dialog. But it
has worked before. I think the problem has started when I moved the
code which fills the table to its own class.
But (and I start to repeat myself :-), the DataTable really contains
data, so how on earth could the data-binding possible fail ?
Peter.