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

Populate Custom Advanced-Insert Subject

1 Answer 50 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 24 Jan 2012, 11:17 PM
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?

--Thanks!

<InlineInsertTemplate>
                        <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 />
                        </div>
                    </InlineInsertTemplate>


...
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
                openAdvancedEditAppointment(selectedAppointment);
            }
            scheduler.hideInlineForm();
            return false;
        }


1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 Jan 2012, 10:27 AM
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,
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
Tags
Scheduler
Asked by
Michael
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or