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

How to disable validation for one textbox inside a panel with the RadInputManager

1 Answer 111 Views
Input
This is a migrated thread and some comments may be shown as answers.
Saied Hassaninia
Top achievements
Rank 1
Saied Hassaninia asked on 03 Feb 2010, 09:03 PM
I have an asp:Panel that contains about 10 TextBox fields inside of it.  I set up a RadInputManager to ensure that the Textboxes are not empty, however, one of the TextBoxes is not required, but because it is wrapped in a asp:Panel, it thinks it needs to be validated.  Is there a way to override the validation?

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 09 Feb 2010, 09:04 AM
Hello Saied,

You could try to add the RadInputManager control into the asp:Panel control. Then you could add all TextBox controls which need validation into the RadInputManager's TargetControls collection:

<asp:Panel runat="server" ID="panel">
  <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
  <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
  <telerik:RadInputManager ID="RadInputManager1" runat="server">
    <telerik:TextBoxSetting InitializeOnClient="true"
       BehaviorID="TextBoxBehavior1" EmptyMessage="type here" Validation-
       IsRequired="true">
     <TargetControls>
       <telerik:TargetInput ControlID="TextBox1" />
       <telerik:TargetInput ControlID="TextBox2" />
     </TargetControls>
  </telerik:TextBoxSetting>
 </telerik:RadInputManager>
</asp:Panel>

Additionally I am sending you a simple example that illustrates how to achieve the desired functionality.
    
I hope this helps.

Best wishes,
Radoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Input
Asked by
Saied Hassaninia
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or