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

RadNumericTextBox Validation Required

9 Answers 529 Views
Input
This is a migrated thread and some comments may be shown as answers.
Edward Sudit
Top achievements
Rank 1
Edward Sudit asked on 18 Jun 2010, 03:53 PM
Is there a property for the RadNumericTextBox equivalent to the "Validation-IsRequired" property of the RadInputManager control?

9 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 21 Jun 2010, 12:05 PM
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
0
Edward Sudit
Top achievements
Rank 1
answered on 21 Jun 2010, 01:35 PM
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?
0
Maria Ilieva
Telerik team
answered on 21 Jun 2010, 02:06 PM
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
0
Edward Sudit
Top achievements
Rank 1
answered on 21 Jun 2010, 03:54 PM
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
0
Maria Ilieva
Telerik team
answered on 24 Jun 2010, 02:59 PM
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
0
Herbert
Top achievements
Rank 1
answered on 20 Jun 2012, 04:13 AM
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




0
Maria Ilieva
Telerik team
answered on 22 Jun 2012, 02:35 PM
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.
0
Herbert
Top achievements
Rank 1
answered on 24 Jun 2012, 03:29 AM
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;




0
Maria Ilieva
Telerik team
answered on 27 Jun 2012, 08:35 PM
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.
Tags
Input
Asked by
Edward Sudit
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Edward Sudit
Top achievements
Rank 1
Herbert
Top achievements
Rank 1
Share this question
or