LightboxSelect list from model using MVC

Hi,
I am trying to populate a LightboxSelect from a model but am running into difficulties. What I currently have is

      var test = new LightboxSelect("TrainId", "Trains");
            test.AddOptions(db.Train);
            sched.Lightbox.Items.Insert(1, test);

However the is populated by the correct number of entities in the db but they are all displayed as undefined
http://prntscr.com/61v6yj

Not sure how i get around this?
Thanks

Hi,
make sure the options objects have ‘key’ and ‘label’ properties defined
scheduler-net.com/docs/lightbox. … n_controls
for example:

 test.AddOptions(db.Train.Select(t => new {key = t.ID, label = t.Name}));

:slight_smile: Awesome, cheers for that