RadNumericTextbox to show error warning

4 posts, 0 answers
  1. Stalin
    Stalin avatar
    15 posts
    Member since:
    Jun 2012

    Posted 01 Jul 2013 Link to this post

    Hi,

    To show up error icon in client site below code is working, 

    args.set_cancel(true);
    sender._invalid = true;
         sender.updateCssClass();

    How to get the same behavior through code-behind, so that i can avoid writing JavaScript ?
    I tried asp custom validator but not able to get the error warning icon.

    Thanks,
    Stalin

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 03 Jul 2013 Link to this post

    Hello Stalin,

    The client-side Invalid property for RadInput controls was introduced in Q2 2013. This property could be used to get or set the state of a control from the RadInput group on the client. It is a client-side property and its value is not persisted on the server. Also the server-side Invalid property is not affected by it. However if you set the server-side Invalid property to true, the client-side property will also be set to true.

    In order to set a RadInput control as invalid on the server you could use the following line:

    RadNumericTextBox1.Invalid = true;

    After the property is set to true a Css class called .riError will be applied to the control.

    Regards,
    Viktor Tachev
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stalin
    Stalin avatar
    15 posts
    Member since:
    Jun 2012

    Posted 09 Jul 2013 Link to this post

    I am able to use the client side api but the server-side is not available, RadNumericTextbix1.Invalid is not available in code-behind.
    I have Telerik ASP.NET AJAX 2012.1.411.35 version. 

    Thanks,
    Stalin
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Jul 2013 Link to this post

    Hi Stalin,

    The Invalid property was introduced in Q2 2013 release of RadControls. I tried the same code in the latest version of Telerik RadControls for ASP.NET AJAX and it worked fine at my end. So please update your RadControls to the latest version to get it working.

    Thanks,
    Princy.
Back to Top