LightboxRadio needs to be checked by default

Hi,

I have code that dynamically populates a list of radiobuttons

var check = new LightboxRadio("id", "Name");
            foreach (var db_item in db_Items)
            {
                check.AddOption(new LightboxSelectOption(db_item.id, db_item.Name));
            }

sched.Lightbox.Add(check);

How do i set it to check the first radio button by default?

Regards

Hello,
in current version you can do it using client side handler

scheduler.attachEvent("onEventCreated", function(id){
     if(scheduler.getEvent(id)){
            scheduler.getEvent(id).radiobutton_option = default;
     }
});

Does this code go in the javascript n the index or the controller (using MVC)?

Regards

It goes to the index, after DHXScheduler.Render()
‘radiobutton_option’ - is the property on which LightboxRadio is mapped
‘default’ - value of the option that should be selected by default

Cheers