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.
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
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.
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...
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
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:
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
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;
}
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
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
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.