get AdvancedFrom custom controls

3 posts, 1 answers
  1. Jean-Marc
    Jean-Marc avatar
    93 posts
    Member since:
    Mar 2011

    Posted 30 May 2012 Link to this post

    In the AdvancedForm i added some controls

     <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 %>'
                                        <DatePopupButton Visible="True" />
                                        <DateInput ID="DateInput1" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                            EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />

    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,

  2. Answer
    Ivana avatar
    657 posts

    Posted 04 Jun 2012 Link to this post

    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:

    I hope this will help.

    Kind regards,
    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.
  3. Jean-Marc
    Jean-Marc avatar
    93 posts
    Member since:
    Mar 2011

    Posted 14 Jun 2012 Link to this post

    Thank you Ivana
Back to Top