This is a migrated thread and some comments may be shown as answers.

[Solved] Get handle to template's child control

1 Answer 105 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
norris1976
Top achievements
Rank 1
norris1976 asked on 14 Nov 2007, 09:55 PM
Hi,

I have a RadScheduler control with a insert and edit templates.

The templates have a RadioButtonList, with 3 hardcoded ListItems.
I am looking to get the value of the selected list item during the AppointmentInsert event handler.

Can this be done?

Thanks,
Tim

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 15 Nov 2007, 10:27 AM
Hello Norris,

You cannot access the nested RadioButtonList in the AppointmentInsert event handler, but you can use the AppointmentCommand event handler instead.  Please, refer to the Templates online example and tweak the code as follows:

    protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)  
        {  
            if(e.CommandName == "Insert")  
            {  
                RadioButtonList list2 = (RadioButtonList)e.Container.FindControl("UsersRadioButtonList");  
                Label1.Text = list2.SelectedValue;  
 

Let us know how it goes.


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
norris1976
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or