Populate Custom Advanced-Insert Subject

2 posts, 0 answers
  1. Michael
    Michael avatar
    1 posts
    Member since:
    Jan 2012

    Posted 24 Jan 2012 Link to this post

    I have an inline template with an "edit details" button that pops a rad window containing a custom advanced insert form.

    If the user startes to enter a subject and clicks on edit details, I need a way to populate the subject line in the custom advanced insert form with the user entered subject.  How can I access the text from TitleTextBox2?


                            <div id="InlineInsertTemplate" style="height: 20px">
                                <asp:TextBox ID="TitleTextBox2" runat="server" Text='<%# Bind("Subject") %>' Width="90%"
                                    TextMode="MultiLine" />
                                <br />
                                <asp:Button ID="InsertButton" runat="server" CssClass="stdButton" CommandName="Insert"
                                    Text="Save" />
                                <input type="button" id="InlineInsertEditButton" class="stdButton" onclick="inlineEdit(-1)"
                                    value="Edit Details" />
                                <asp:Button ID="InsertCancelButton" runat="server" CssClass="stdButton" CausesValidation="False"
                                    CommandName="Cancel" Text="Cancel" />
                                <br />

    function inlineEdit(inlineEditType) {
                var scheduler = $find('<%=RadScheduler1.ClientID %>');
                var TitleTextBox2ID = $find('<%=TitleTextBox2.ClientID %>');  //Error: 'TitleTextBox2' is not declared. It may be inaccessible due to its protection level.
                selectedAppointment = scheduler.get_currentAppointment();            
                if (inlineEditType == -1) {  //Create New
                    openAdvancedCreateAppointment(selectedAppointment.get_start(), selectedAppointment.get_end(), selectedAppointment._isAllDay(), null);
                else if (inlineEditType == -2) { //Edit
                return false;

  2. Peter
    Peter avatar
    6637 posts

    Posted 27 Jan 2012 Link to this post

    Hi Michael,

    I suggest you use RadTextBox and its client API. The client-side object of RadTextBox can be retrieved using $find([RenderedIDofTheContro]). There is a similar scenario in this help topic -> section on Find the description client object and set its empty message.

    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
Back to Top