c# - Datasource says not binding to IList...but I am aren't I -


i getting:

data source invalid type. must either ilistsource 

which straight forward. need binding collection such list instead of single item...only think binding list not understanding?

my collection object singleton such:

public class calendarevents {     private static calendarevents _calendareventshandle;      internal list<calendarevent> abcd_calendarevents { get; set; }      //seal constructor     private calendarevents()      {         this.abcd_calendarevents = new list<calendarevent>();     }      internal static calendarevents calendareventshandle     {                  {             if(_calendareventshandle == null)             {                 _calendareventshandle = new calendarevents();             }              return _calendareventshandle;         }      }         } 

my handle assignment:

calendarevents eventscal = calendarevents.calendareventshandle; 

populating collection:

eventscal.abcd_calendarevents.add(new calendarevent(...));  //40 records expect scenario 

and binding lines are:

radsched_instcalendar.datasource = eventscal.abcd_calendarevents; 

what missing or doing wrong??

thank you


full error minus stack

data source invalid type. must either ilistsource, ienumerable, or idatasource. description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.

exception details: system.invalidoperationexception: data source invalid type. must either ilistsource, ienumerable, or idatasource.

source error:

an unhandled exception generated during execution of current web request. information regarding origin , location of exception can identified using exception stack trace below


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -