AdvancedInsertTemplate Scheduler

2 posts, 0 answers
  1. abhijit
    abhijit avatar
    13 posts
    Member since:
    Jul 2011

    Posted 02 Jan 2012 Link to this post

    HI i am using AdvancedInsertTemplate in scheduler. i have added two text box in template and i want to add client side required field validation for these text boxes. please let me know how can i achive this.

    currently i am using below code , but i am not able to get textbox control ID.

    var txtName = $find('TxtName');


    waiting for your reply...
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 03 Jan 2012 Link to this post

    Hi,

    Try the following:
    <telerik:RadScheduler runat="server" ID="RadScheduler1">
        <AdvancedInsertTemplate>
            <div>
                <div>
                    <asp:TextBox runat="server" ID="textBox1" />
                    <asp:TextBox runat="server" ID="textBox2" />
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="textBox1"
                        Display="Dynamic" ErrorMessage="TextBox1 must have value!" CssClass="class" />
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="textBox2"
                        Display="Dynamic" ErrorMessage="TextBox2 must have value!" CssClass="class"/>
                </div>
                <asp:LinkButton ID="CancelButton" runat="server" Text="cancel" CommandName="Cancel" />
                <asp:LinkButton ID="InsertButton" runat="server" Text="insert" CommandName="Insert"/>
            </div>
        </AdvancedInsertTemplate>
    </telerik:RadScheduler>
    <style>
        .class
        {
            color: Red;
        }
    </style>

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