473,395 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

'IListSource does not contain any data sources'

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
2 7761
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
>> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Eric J. Smith | last post by:
I am attempting to add an Editor attribute to an IListSource derived class (specifically it's a typed DataSet). It appears that IListSource over rules any Editor attribute. Is there any way that...
1
by: troutbum | last post by:
I am trying to bind a datagrid to a dataset that is returned via a function. Public Function RetrieveList(ByRef r_DataSet As DataSet) that sets the dataset that is passed by reference. When I try...
8
by: Lars-Erik Aabech | last post by:
Hi! We've got an ASP.NET application that runs swell on development PC's and one live production server. Another prod. server though crashes a couple of times a week. Either something that...
10
by: Assimalyst | last post by:
Hi, I'm attempting to use a data reader to load data from a single table, tblCountry, with two columns, countryNo (the Key) and countryName, into a DropDownList box. Here's the code: ...
7
by: BS | last post by:
Hello everybody I'm calling a webservice that returns complex data. The goal is to populate a datagrid with it. Using a loop for each record found ( such as For i = 0 To...
5
by: rogsonl | last post by:
My computer was moved last week, and the company changed the network groups we work on. As a result, one of the main benefits from Whidbey (database connectivity) no longer works. Situation: 1....
5
by: Richard Bysouth | last post by:
Hi I am trying to create an object that I can use to bind to a grid in my Win app. All of the examples that I have found on custom data sources have the properties (e.g. FirstNamer, LastName) of...
0
by: Mike P | last post by:
I am getting the error The 'IListSource does not contain any data sources' on the DataBind line in my code below. I have stepped through and there are records in the data reader...in fact this...
3
by: =?Utf-8?B?V2FsaWQ=?= | last post by:
Hello: I have migrated a site from IIS5 to IIS6. The site is configured and the we app is installed on the new IIS site. I can get to the web page but when I try to login, this is what I get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.