RequiredFieldValidator validating incorrectly on RadComboBox

5 posts, 0 answers
  1. Karl
    Karl avatar
    1 posts
    Member since:
    Mar 2011

    Posted 25 Mar 2011 Link to this post

    Hi I have a RadCombobox control, and a requiredFieldValidator that validates it for empty text.
    The thing is that when I tried to key in any text, it gives me the validation error (instead of the other way round). So when I typed in "testing" it prompts the error. When I removed it, it is still there.
    The error will not disappear until I tried to select one of the item inside the dropdownlist.
    Anyone had any idea?

    Below is my aspx code:

    <telerik:RadComboBox ID="radProcessLn" runat="server" AllowCustomText="true" EnableScreenBoundaryDetection="False" EmptyMessage="Insert/select" />
    <asp:RequiredFieldValidator ID="rfvProcessLn" ControlToValidate="radProcessLn" ErrorMessage="Please enter Process Ln / Operation" InitialValue="" ValidationGroup="Submit" CssClass="mandatory" runat="server"Display="Dynamic" />

    Update: Tested it out on Google Chrome, IE8, and IE7 and the validation is working just fine. But it's not in IE9.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Mar 2011 Link to this post

    Hello Karl,

    As a work around, you can try using CustomValidator instead of RequiredFieldValidator. Please go through the following help article for more on this.
    Validate Combobox by Value

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ravinder
    Ravinder avatar
    1 posts
    Member since:
    Oct 2013

    Posted 31 Oct 2013 Link to this post

    Hi, I am using RequiredField Validator for RadComboBox,but it is working fine for the first time,if i go back and click it will again asking,
    it should not like that.How I can achieve   

     

     

     

     

         

     

     

     

     

       

     

     

     

     

         

     

     

     

     

         

      

     
     

     

  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Nov 2013 Link to this post

    Hi Ravinder,

    Please take a look into the following code snippet I tried where the RequiredField Validator for RadComboBox works as expected.

    ASPX:
    <telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="select">
        <Items>
            <telerik:RadComboBoxItem Text="Item1" runat="server" />
            <telerik:RadComboBoxItem Text="Item2" runat="server" />
            <telerik:RadComboBoxItem Text="Item3" runat="server" />
        </Items>
    </telerik:RadComboBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="RadComboBox1">
    </asp:RequiredFieldValidator>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Confirm" OnClick="RadButton1_Click">
    </telerik:RadButton>

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
    }
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        Response.Redirect("Removeitem.aspx");
    }

    Thanks,
    Shinu.
  6. Bilawal
    Bilawal avatar
    2 posts
    Member since:
    Jun 2013

    Posted 03 Oct 2014 in reply to Shinu Link to this post

    Wow its work for me thanks man :)
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017