RadNumericTextBox Validation Required

10 posts, 0 answers
  1. Edward Sudit
    Edward Sudit avatar
    29 posts
    Member since:
    Aug 2012

    Posted 18 Jun 2010 Link to this post

    Is there a property for the RadNumericTextBox equivalent to the "Validation-IsRequired" property of the RadInputManager control?
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 21 Jun 2010 Link to this post

    Hi,

    The RadNumericTextBox does not provide this property, however you could suggest using the RadInputManager to extend regular textboxes as RadNumericTextBox and use it as needed.

    Best wishes,
    Maria Ilieva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Edward Sudit
    Edward Sudit avatar
    29 posts
    Member since:
    Aug 2012

    Posted 21 Jun 2010 Link to this post

    Using the RadInputManager to extend regular textboxes works great, but does not offer Spin Buttons or keyboard and mouse intercept functionality.  I tried to use the RadNumbericTextBox as TargetInput control of RadInputManager, but that does not work.  Can you suggest a way I can include the "Validation-IsRequired" functionality in a TadNumericTextBox control?
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 21 Jun 2010 Link to this post

    Hi,

    You could use the RadNumericTextBox with asp RequiredFieldValidator in order to achieve the needed functionality. Please refer to the following online demo which elaborates on this matter.

    Best wishes,
    Maria Ilieva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Edward Sudit
    Edward Sudit avatar
    29 posts
    Member since:
    Aug 2012

    Posted 21 Jun 2010 Link to this post

    Hi Maria,

    I appreciate your reply, but I am currently using ASP RequireFieldValidator now.  The feature of the RadInputManager is very neat where the warning image is displayed inside the field as soon as the user tabs out of it, instead of waiting for a postback.  This is the feature I am looking for in the RadNumericTextBox control.

    Thanks,
    Ed
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 24 Jun 2010 Link to this post

    Hi,

    Note that this is the default behavior for all asp input controls not only for Telerik RadNumericTextBox and it could not be changed. It actually needs a postback only for the first time you try to validate. After that as the validator is already properly attached to the control the tabbing from the input fires validation.



    Greetings,
    Maria Ilieva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Herbert
    Herbert avatar
    2 posts
    Member since:
    Apr 2012

    Posted 19 Jun 2012 Link to this post

    Hi,

    I have the same result, that's will be very great if RadInputManager also support RadNumericTextBox validation. Or is there any purpose in behind that not to support RadNumericTextBox validation?

    Thanks
    Herbert




  9. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 22 Jun 2012 Link to this post

    Hello Herbert,

    Please note that by the time the last answered to this thread was post we have made some significant changes in the RadInput controls. Therefore could you please share what exactly is the issue you are currently facing? Posting your page markup as well as the related code behind will help us further research int he issue and od our best to provide a proper solution.

    Kind regards,
    Maria Ilieva
    the Telerik team
    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 their blog feed now.
  10. Herbert
    Herbert avatar
    2 posts
    Member since:
    Apr 2012

    Posted 23 Jun 2012 Link to this post

    Hi

    I want to use RadInputManager to set the control RadNumericTextBox is required field and validate the input, the control is within RadGrid EditFormSettings.

    I follow the following example, and modify a bit, is it my coding problem?

    http://www.telerik.com/help/aspnet-ajax/grid-linq-to-sql-manual-crud-operations.html 

    GridEditFormItem editedItem = e.Item as GridEditFormItem;
     
    RadNumericTextBox rntTotalCarton = editedItem.FindControl("rntTotalCarton") as RadNumericTextBox;
    RadNumericTextBox rntQuantity = editedItem.FindControl("rntQuantity") as RadNumericTextBox;
    RadNumericTextBox rntUnitPrice = editedItem.FindControl("rntUnitPrice") as RadNumericTextBox;
    RadNumericTextBox rntNetWeight = editedItem.FindControl("rntNetWeight") as RadNumericTextBox;
    RadNumericTextBox rntGrossWeight = editedItem.FindControl("rntGrossWeight") as RadNumericTextBox;
     
    inputSetting.InitializeOnClient = true;
    inputSetting.Validation.IsRequired = true;
     
    NumericTextBoxSetting numericTextBoxSetting = (NumericTextBoxSetting)RadInputManager1.GetSettingByBehaviorID("NumericBehavior1");
    numericTextBoxSetting.TargetControls.Add(new TargetInput(rntTotalCarton.UniqueID, true));
    numericTextBoxSetting.TargetControls.Add(new TargetInput(rntQuantity.UniqueID, true));
    numericTextBoxSetting.TargetControls.Add(new TargetInput(rntUnitPrice.UniqueID, true));
    numericTextBoxSetting.TargetControls.Add(new TargetInput(rntNetWeight.UniqueID, true));
    numericTextBoxSetting.TargetControls.Add(new TargetInput(rntGrossWeight.UniqueID, true));
    numericTextBoxSetting.InitializeOnClient = true;
    numericTextBoxSetting.Validation.IsRequired = true;




  11. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 27 Jun 2012 Link to this post

    Hello Herbert,

    Please note that the RadInputManager control is designed to inputify only regular asp TextBox controls in order to simulate RadInput controls look and feel. In your code you are adding RadNumericTextBox as TargetControls for the RadInputManager which is not a supported scenario.
    As you can see from the mentioned help topic the target controls are th GridBoundColumnEditor fields which are actually asp TextBox controls.

    All the best,
    Maria Ilieva
    the Telerik team
    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 their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017