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

RequiredFieldValidator (or any validator) and Display=Dynamic

1 Answer 618 Views
Input
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 02 Oct 2008, 07:07 PM
I am using Rad Controls for ASP.NET release 2008.2.804.20 and I am getting a strange behavior for Display=Dynamic, when I have tried it on several controls, when used with standard .NET validators.

For the .NET controls,
The RequiredFieldValidator checks to make sure the ControlToValidate has a value, any value. The Display property allows us to control the space taken by the control when there is no error  -- i.e Display=Dynamic collapses the space, while Display=Static reserves it.

However, when I use Display=Dynamic on a required field validitor for Rad Text Box, It displays the message all the time and it is not dynamic. Even when the entry is valid, the message is displayed.

          <telerik:RadTextBox ID="State" runat="server" TabIndex="5"
          SelectionOnFocus="CaretToBeginning" >
          <FocusedStyle BackColor="#F1F6FC" />
          </telerik:RadTextBox>
          <div class="valRequired">
      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
       ControlToValidate="State" SetFocusOnError="True" Display="Dynamic">Required 
       </asp:RequiredFieldValidator>
       </div>

In contrast

             <asp:TextBox ID="City" runat="server" TabIndex="4" ></asp:TextBox>
           <div class="block valRequired">
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
        ControlToValidate="City" Display="Dynamic" SetFocusOnError="True">Required
        </asp:RequiredFieldValidator>
        </div>

works as expected.

How do I get your controls to work as expected with Display="Dynamic"?

Keith E.

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 03 Oct 2008, 08:05 AM
Hello Keith,


The issue is fixed in versions 2008.2.1001of Telerik.Web.UI.dll. I made a test with v. 2008.2.1001 and I was not able to reproduce the problem. Please, update to the latest version of RadControls for ASP.NET AJAX

All the best,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Input
Asked by
Keith
Top achievements
Rank 1
Answers by
Missing User
Share this question
or