By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,191 Members | 1,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,191 IT Pros & Developers. It's quick & easy.

'IListSource does not contain any data sources'

P: n/a
Hi,

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 ?
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Do you have any code that happens on databinding, etc.

Does this work on just a plain grid with nothing customized?

<pe***@yahoo.not> wrote in message
news:b0********************************@4ax.com...
Hi,

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 ?

Nov 19 '05 #2

P: n/a
>> 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.
Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.