Telerik RadScheduler AdvancedForm At Insert/Update

6 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 23 Jan 2012 Link to this post

    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.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Jan 2012 Link to this post

    Hello,

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

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 24 Jan 2012 Link to this post

    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...
  5. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 26 Jan 2012 Link to this post

    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
  6. Ken
    Ken avatar
    28 posts
    Member since:
    Sep 2012

    Posted 01 Aug 2012 Link to this post

    Is there any update to this.. I to am looking for a way to access the controls directly in the AppointmentInsert... thanks
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 02 Aug 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017