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

get AdvancedFrom custom controls

2 Answers 26 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jean-Marc
Top achievements
Rank 1
Jean-Marc asked on 30 May 2012, 02:43 PM
In the AdvancedForm i added some controls

example:
 <ul class="rsTimePickers">
                        <li class="rsTimePick">
                            <label for='<%= VisibleFromDate.ClientID %>_dateInput_text'>Visible from</label><%--
                                Leaving a newline here will affect the layout, so we use a comment instead.
                                --%><telerik:RadDatePicker runat="server" ID="VisibleFromDate" CssClass="rsAdvDatePicker"
                                    Width="110px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                    MinDate="1900-01-01">
                                    <DatePopupButton Visible="True" />
                                    <DateInput ID="DateInput1" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                        EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                                </telerik:RadDatePicker>
                             
                        </li>
</ul>

but i can figure out how to get the raddatepicker VisibleFromDate value in the AppointmentInsert function (i tried custom attributes with no success)

I found this thread that seems to apply to my case
protected void Radscheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
{
    if (e.Container.Mode == SchedulerFormMode.AdvancedEdit || e.Container.Mode == SchedulerFormMode.AdvancedInsert)
    {
        _VisibleFromDate = (raddatepicker)e.Container.FindControl("VisibleFromDate");
             
    }
}

I got an error here VisibleFromDate control is not found.

I just want to get values from custom controls in the insert but I'm struggling for days,
Help!


2 Answers, 1 is accepted

Sort by
0
Accepted
Ivana
Telerik team
answered on 04 Jun 2012, 03:02 PM
Hi Jean-Marc,

You should be able to access the RadDatePicker control from within the FormCreated event handler if the form is advanced.
If you are using Web service binding, however, the FormCreated server event will not be fired. In this case you should use the client FormCreated event.
Please take a look at the following help articles explaining more on how to access the controls inside the advanced form of RadScheduler on the client as well as on the server:
http://www.telerik.com/help/aspnet-ajax/scheduler-customizing-advanced-form-javascript-jquery-css.html
http://www.telerik.com/help/aspnet-ajax/scheduler-customzing-advanced-form-advanced-templates.html.

I hope this will help.

Kind 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
Jean-Marc
Top achievements
Rank 1
answered on 14 Jun 2012, 10:14 AM
Thank you Ivana
Tags
Scheduler
Asked by
Jean-Marc
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Jean-Marc
Top achievements
Rank 1
Share this question
or