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

AdvancedInsertTemplate Scheduler

1 Answer 34 Views
This is a migrated thread and some comments may be shown as answers.
abhijit
Top achievements
Rank 1
abhijit asked on 02 Jan 2012, 02:40 PM
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...

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 03 Jan 2012, 12:21 PM
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
Asked by
abhijit
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or