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

Validation only when submit button is clicked

1 Answer 324 Views
Input
This is a migrated thread and some comments may be shown as answers.
Bryan Page
Top achievements
Rank 1
Bryan Page asked on 12 Aug 2009, 12:48 PM
I have 2 simple textboxes that I use a RadInputManager around.   I like the highlighted box and exclamation point (!) triangle that appears around the box when left blank which locks the page until the user fills out the information, but my issue is a user cannot click on a Telerik Menu link unless they fill in "something".   I don't want that behavior.  

The user can click whatever they want in the navagation menu and it should go there.  But it doesn't allow any click.

My code is below.  I just want the highlighted box triangle ! feature but only specific to the user clicking the event "submit" button.

Here is my code, the Validation set to TRUE makes it "isRequired", not sure how to use that.

 

<telerik:RadInputManager ID="radInputManager1" runat="server" Skin="Web20" >

 

 

<telerik:TextBoxSetting Validation-IsRequired="true">

 

 

<TargetControls>

 

 

<telerik:TargetInput ControlID="txtNewPassword" />

 

 

<telerik:TargetInput ControlID="txtRetypePassword" />

 

 

</TargetControls>

 

 

<Validation IsRequired="True" ValidateOnEvent="All"></Validation>

 

 

</telerik:TextBoxSetting>

 

 

 

</telerik:RadInputManager>

 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 17 Aug 2009, 09:00 AM
Hello Bryan,

You could use the ValidationGroup property of the submit button and this of the RadInputManager in order to achieve your goal.

Check the attached sample I prepared to illustrated the suggested solution.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Input
Asked by
Bryan Page
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or