Advertisement

07.14.2005 at 07:19AM PDT, ID: 21491477
[x]
Attachment Details

Binding ArrayList to DataGrid

Asked by split-etm- in Microsoft Visual Basic.Net

Tags: , ,

Hi,

I have a BookBag object (ArrayList) that holds a number of BookBagItem objects. Each BookBagItem has several properties (ISBN, Stock#, etc.). Its easy enough to populate the BookBag with BookBagItems, but im having difficulty binding the BookBag to a DataGrid to display each of the BookBagItems.

The returned error is as follows:
An invalid data source is being used for dgBookBag. A valid data source must implement either IListSource or IEnumerable.

I have some code (C#) for a small windows form that i downloaded that demonstrates binding and ArrayList to a DataGrid in a similar manner.

I just cant seem to get my head around this...am I just being really stupid and not seeing the solution?

Any help appreciated!
(pls let me know if i should post some of my code...)Start Free Trial
 
Loading Advertisement...
 
[+][-]07.14.2005 at 07:40AM PDT, ID: 14441261

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: arraylist, datagrid, bind
Sign Up Now!
Solution Provided By: samtran0331
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.14.2005 at 09:47AM PDT, ID: 14442770

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2005 at 10:26AM PDT, ID: 14443148

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.15.2005 at 03:35AM PDT, ID: 14449285

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2005 at 05:22AM PDT, ID: 14449942

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32