AutoCompleteBox on RadScheduler AdvancedForm

2 posts, 0 answers
  1. Jason Li
    Jason  Li avatar
    17 posts
    Member since:
    Apr 2010

    Posted 02 Jan 2013 Link to this post

    Hi,

    I am trying to add a AutoCompleteBox on the advanced form of RadScheduler which is a provided sample from TelerikBut the control is somehow disabled after rendering, it can not take input cursor in the input box. I have tried to add other controls to the same form, they all work fine. The below are the screenshot and the code.

    Thanks a lot.

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvancedForm.ascx.cs"
        Inherits="RadSchedulerAdvancedFormAdvancedForm" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="scheduler" TagName="ResourceControl" Src="ResourceControl.ascx" %>
    <%@ Register TagPrefix="scheduler" TagName="MultipleValuesResourceControl" Src="MultipleValuesResourceControl.ascx" %>
    <div class="rsAdvancedEdit rsAdvancedModal" style="position: relative">
        <div class="rsModalBgTopLeft">
        </div>
        <div class="rsModalBgTopRight">
        </div>
        <div class="rsModalBgBottomLeft">
        </div>
        <div class="rsModalBgBottomRight">
        </div>
        <%-- Title bar. --%>
        <div class="rsAdvTitle">
            <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%>
            <h1 class="rsAdvInnerTitle">
                <%= (this.Mode.ToString() == "Edit") ? Owner.Localization.AdvancedEditAppointment : Owner.Localization.AdvancedNewAppointment %></h1>
            <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose"
                CommandName="Cancel" CausesValidation="false" ToolTip='<%# Owner.Localization.AdvancedClose %>'>
                <%= Owner.Localization.AdvancedClose %>
            </asp:LinkButton>
        </div>
        <div class="rsAdvContentWrapper">
            <%-- Scroll container - when the form height exceeds MaximumHeight scrollbars will appear on this element--%>
            <div class="rsAdvOptionsScroll">
                <asp:Panel runat="server" ID="AdvancedEditOptionsPanel" CssClass="rsAdvOptions">
                    <asp:Panel runat="server" ID="BasicControlsPanel" CssClass="rsAdvBasicControls" OnDataBinding="BasicControlsPanel_DataBinding">
                        <telerik:RadTextBox runat="server" ID="SubjectText" Width="100%" Label='<%# Owner.Localization.AdvancedSubject + ":" %>'
                            EnableSingleInputRendering="false" />
                        <asp:RequiredFieldValidator runat="server" ID="SubjectValidator" ControlToValidate="SubjectText"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <ul class="rsTimePickers">
                            <li class="rsTimePick" style="width: 244px;">
                                <label for='<%= StartDate.ClientID %>_dateInput_text'>
                                    <%= Owner.Localization.AdvancedFrom %>:
                                </label>
                                <%--
                                    Leaving a newline here will affect the layout, so we use a comment instead.
                                --%><telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker"
                                    Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                    MinDate="1900-01-01">
                                    <DatePopupButton Visible="False" />
                                    <DateInput ID="DateInput2" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                        EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                                </telerik:RadDatePicker>
                                <%--
                                 
                                --%><telerik:RadTimePicker runat="server" ID="StartTime" CssClass="rsAdvTimePicker"
                                    Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'>
                                    <DateInput ID="DateInput3" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" "
                                        EnableSingleInputRendering="false" />
                                    <TimePopupButton Visible="false" />
                                    <TimeView ID="TimeView1" runat="server" Columns="2" ShowHeader="false" StartTime="08:00"
                                        EndTime="18:00" Interval="00:30" />
                                </telerik:RadTimePicker>
                            </li>
                            <li class="rsTimeZonesWrapper">
                                <telerik:RadComboBox runat="server" Visible="true" ID="TimeZonesDropDown" Width="230"
                                    Label="<%# Owner.Localization.AdvancedTimeZone + ':' %>" Skin='<%# Owner.Skin %>'>
                                </telerik:RadComboBox>
                            </li>
                            <li class="rsAllDayWrapper">
                                <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" />
                            </li>
                            <li class="rsTimePick rsEndTimePick" style="width: 244px;">
                                <label for='<%= EndDate.ClientID %>_dateInput_text'>
                                    <%= Owner.Localization.AdvancedTo%>:
                                </label>
                                <%--
                                 
                                --%><telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker"
                                    Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                    MinDate="1900-01-01">
                                    <DatePopupButton Visible="False" />
                                    <DateInput ID="DateInput4" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                        EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                                </telerik:RadDatePicker>
                                <%--
                                FT
                                --%><telerik:RadTimePicker runat="server" ID="EndTime" CssClass="rsAdvTimePicker"
                                    Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'>
                                    <DateInput ID="DateInput5" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" "
                                        EnableSingleInputRendering="false" />
                                    <TimePopupButton Visible="false" />
                                    <TimeView ID="TimeView2" runat="server" Columns="2" ShowHeader="false" StartTime="08:00"
                                        EndTime="18:00" Interval="00:30" />
                                </telerik:RadTimePicker>
                            </li>
                        </ul>
                        <div class="rsReminderWrapper">
                            <telerik:RadComboBox runat="server" ID="ReminderDropDown" Label="<%# Owner.Localization.Reminder + ':' %>"
                                Width="120px" Skin='<%# Owner.Skin %>'>
                                <Items>
                                    <telerik:RadComboBoxItem Text='<%# Owner.Localization.ReminderNone %>' Value="" />
                                    <telerik:RadComboBoxItem Text='<%# "0 " + Owner.Localization.ReminderMinutes %>'
                                        Value="0" />
                                    <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderMinutes %>'
                                        Value="5" />
                                    <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderMinutes %>'
                                        Value="10" />
                                    <telerik:RadComboBoxItem Text='<%# "15 " + Owner.Localization.ReminderMinutes %>'
                                        Value="15" />
                                    <telerik:RadComboBoxItem Text='<%# "30 " + Owner.Localization.ReminderMinutes %>'
                                        Value="30" />
                                    <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderHour %>' Value="60" />
                                    <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderHours %>' Value="120" />
                                    <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderHours %>' Value="180" />
                                    <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderHours %>' Value="240" />
                                    <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderHours %>' Value="300" />
                                    <telerik:RadComboBoxItem Text='<%# "6 " + Owner.Localization.ReminderHours %>' Value="360" />
                                    <telerik:RadComboBoxItem Text='<%# "7 " + Owner.Localization.ReminderHours %>' Value="420" />
                                    <telerik:RadComboBoxItem Text='<%# "8 " + Owner.Localization.ReminderHours %>' Value="480" />
                                    <telerik:RadComboBoxItem Text='<%# "9 " + Owner.Localization.ReminderHours %>' Value="540" />
                                    <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderHours %>' Value="600" />
                                    <telerik:RadComboBoxItem Text='<%# "11 " + Owner.Localization.ReminderHours %>' Value="660" />
                                    <telerik:RadComboBoxItem Text='<%# "12 " + Owner.Localization.ReminderHours %>' Value="720" />
                                    <telerik:RadComboBoxItem Text='<%# "18 " + Owner.Localization.ReminderHours %>' Value="1080" />
                                    <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderDays %>' Value="1440" />
                                    <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderDays %>' Value="2880" />
                                    <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderDays %>' Value="4320" />
                                    <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderDays %>' Value="5760" />
                                    <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderWeek %>' Value="10080" />
                                    <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderWeeks %>' Value="20160" />
                                </Items>
                            </telerik:RadComboBox>
                        </div>
                        <asp:RequiredFieldValidator runat="server" ID="StartDateValidator" ControlToValidate="StartDate"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:RequiredFieldValidator runat="server" ID="StartTimeValidator" ControlToValidate="StartTime"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:RequiredFieldValidator runat="server" ID="EndDateValidator" ControlToValidate="EndDate"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:RequiredFieldValidator runat="server" ID="EndTimeValidator" ControlToValidate="EndTime"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:CustomValidator runat="server" ID="DurationValidator" ControlToValidate="StartDate"
                            EnableClientScript="false" Display="Dynamic" CssClass="rsValidatorMsg rsInvalid"
                            OnServerValidate="DurationValidator_OnServerValidate" />
                    </asp:Panel>
                    <asp:Panel runat="server" ID="AdvancedControlsPanel" CssClass="rsAdvMoreControls">
                        <label>
                            Color:
                        </label>
                        <telerik:RadColorPicker ID="AppointmentColorPicker" runat="server" CssClass="rsAdvResourceValue"
                            ShowIcon="true" PaletteModes="WebPalette">
                        </telerik:RadColorPicker>
                        <asp:Panel runat="server" ID="ResourceControls">
                            <%-- RESOURCE CONTROLS --%>
                            <ul class="rsResourceControls">
                                <li>
                                    <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                                    <scheduler:ResourceControl runat="server" ID="ResTeacher" Type="Teacher" Label="Teacher:"
                                        Skin='<%# Owner.Skin %>' />
                                </li>
                                <li>
                                    <scheduler:MultipleValuesResourceControl runat="server" ID="ResStudent" Type="Student"
                                        Label="Student: " />
                                </li>
                                <!-- Optionally add more ResourceControl instances here -->
                            </ul>
                        </asp:Panel>
                    </asp:Panel>
                    <telerik:RadTextBox runat="server" ID="DescriptionText" TextMode="MultiLine" Columns="50"
                        Rows="5" Width="100%" Label='<%# Owner.Localization.AdvancedDescription + ":" %>'
                        Text='<%# Eval("Description") %>' EnableSingleInputRendering="false" />
                    <span class="rsAdvResetExceptions">
                        <asp:LinkButton runat="server" ID="ResetExceptions" OnClick="ResetExceptions_OnClick" />
                    </span>
                    <telerik:RadSchedulerRecurrenceEditor runat="server" ID="AppointmentRecurrenceEditor" />
                    <asp:HiddenField runat="server" ID="OriginalRecurrenceRule" />
                    <telerik:RadCalendar runat="server" ID="SharedCalendar" Skin='<%# Owner.Skin %>'
                        CultureInfo='<%# Owner.Culture %>' ShowRowHeaders="false" RangeMinDate="1900-01-01" />
                </asp:Panel>
                <telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" Width="400" DropDownWidth="200"
                    DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="StudentID" CssClass="">               
                </telerik:RadAutoCompleteBox>
                <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:TelerikVSXConnectionString %>"
                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT [StudentID], [Name] FROM [DbProvider_Students] ORDER By Name">
                </asp:SqlDataSource>
                <telerik:RadTextBox runat="server" ID="DescriptionTexta">
                </telerik:RadTextBox>
                <telerik:RadComboBox runat="server" AllowCustomText="true" DataSourceID="SqlDataSource1"
                    DataTextField="Name" DataValueField="StudentID">
                </telerik:RadComboBox>
            </div>
            <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">
                <div class="rsAdvButtonWrapper">
                    <asp:LinkButton runat="server" ID="UpdateButton" CssClass="rsAdvEditSave">
                        <span><%= Owner.Localization.Save %></span>
                    </asp:LinkButton>
                    <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel"
                        CausesValidation="false">
                        <span><%= Owner.Localization.Cancel %></span>
                    </asp:LinkButton>
                </div>
            </asp:Panel>
        </div>
    </div>

  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 08 Jan 2013 Link to this post

    Hello Jason Li,

    What is the version of RadControls for ASP.NET AJAX that you use?
    There was an issue when RadAutoCompleteBox is initially invisible, that has been already fixed.

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