databind error

Posts   
 
    
nisarkhan
User
Posts: 2
Joined: 03-Jul-2008
# Posted on: 07-Jul-2008 02:42:07   

this is my very first post to this forum and i'm still trying to understand how this all works so here is my question

SD.LLBLGen.Pro.Examples.CollectionClasses.CustomerCollection cc = new SD.LLBLGen.Pro.Examples.CollectionClasses.CustomerCollection(); this.GridView1.DataSource = cc.GetMulti(null); this.GridView1.DataBind();

i'm trying to get all the data from customer table and bind to gridview

is this the way to go ?

Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource.

thanks

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 07-Jul-2008 10:04:59   

GetMulti() returns a boolean.

Try this.

            SD.LLBLGen.Pro.Examples.CollectionClasses.CustomerCollection cc = new SD.LLBLGen.Pro.Examples.CollectionClasses.CustomerCollection();
            cc.GetMulti(null);
            this.GridView1.DataSource = cc;
            this.GridView1.DataBind();