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

Telerik RadScheduler AdvancedForm At Insert/Update

5 Answers 175 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 23 Jan 2012, 06:49 PM
Hello,

Within the AppointmentInsert or AppointmentUpdate event handler, how can I get ASP.NET control references from an advanced form edit/insert template?  I need to find an ASP.NET control in the template within these two events only, and use its value for save.

Thanks.

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Jan 2012, 05:24 AM
Hello,

Take a look into the following demo.
Scheduler / Customizing the Advanced Insert and Edit Forms

Thanks,
Princy.
0
Brian Mains
Top achievements
Rank 1
answered on 24 Jan 2012, 02:48 PM
Princy,

Thanks.  I may be dense, but I don't see how that answers my question...  I don't even see the event handlers in the page that I alluded to...
0
Ivana
Telerik team
answered on 26 Jan 2012, 04:51 PM
Hello,

You could use the FormCreated server event to find the control you need in the AdvancedForm, and then get its value in the AppointmentInsert / Edit event.
Example:
private RadComboBox _room;
protected void Radscheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
{
    if (e.Container.Mode == SchedulerFormMode.AdvancedEdit || e.Container.Mode == SchedulerFormMode.AdvancedInsert)
    {
        _room = (RadComboBox)e.Container.FindControl("ResRoom");
             
    }
}
 
protected void Radscheduler1_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
{
    string text = _room.SelectedItem.Text;
}
 
protected void Radscheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
    string text = _room.SelectedItem.Text;
}
The example shows how to access the Room RadComboBox. Examples on handling FormCreated are available here.

I hope this helps.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ken
Top achievements
Rank 1
answered on 01 Aug 2012, 08:25 PM
Is there any update to this.. I to am looking for a way to access the controls directly in the AppointmentInsert... thanks
0
Peter
Telerik team
answered on 02 Aug 2012, 10:53 AM
Hello,

There is no need to handle FormCreated if you use the approach from the customizing the advanced form demo.


Kind regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Brian Mains
Top achievements
Rank 1
Ivana
Telerik team
Ken
Top achievements
Rank 1
Peter
Telerik team
Share this question
or