I have a number of radtextbox fields on my screen. in addition I have a radgrid in which i can click on a row, it puts the information in the textboxes at the top of the screen where i can edit them. my question is why do all the 'required' field validators kick in when i do an edit, even though the fields have data in them. before, the way the validators worked is they would not show up unless you either a) tabbed out of the field without entering data or b) pressed 'save' and the field was blank. now they show up before the user even has time to enter data. another example is if you have a dropdown as your first field. the minute you pick something from the dropdown, all the required validators show up. the user has not even gone to those fields yet. hopefully, this explained my situation. is there a setting i'm missing?
thanks,
susan
thanks,
susan
5 Answers, 1 is accepted
0
Hi Susan,
To exclude the controls in the grid as triggers of the page validation mechanism, you can disable the validation for the control as shown in this demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/validation/defaultcs.aspx
Moreover, if you want to disable the validation for the edit buttons in rows individually, consider intercepting the ItemCreated or ItemDataBound event of the grid, find the edit button in the corresponding record using the approach from here and set its CausesValidation property to false.
Best regards,
Sebastian
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
To exclude the controls in the grid as triggers of the page validation mechanism, you can disable the validation for the control as shown in this demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/validation/defaultcs.aspx
Moreover, if you want to disable the validation for the edit buttons in rows individually, consider intercepting the ItemCreated or ItemDataBound event of the grid, find the edit button in the corresponding record using the approach from here and set its CausesValidation property to false.
Best regards,
Sebastian
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Susan
Top achievements
Rank 1
answered on 26 Feb 2009, 06:58 PM
sorry, ignore the radgrid example - it was a bad example for my situation. I have a dropdown as my first control and then a number of textboxes after that and they are all required. when i make a selection from my first control, the dropdown, all the required validators pop up. i have not even reached these fields yet to give the user a chance to enter them, so i don't want the validator appearing. i tried to put a 'causesvalidation=false' on the dropdown, but that did not work. can you tell me how to do this?
thanks,
susan
thanks,
susan
0
Hi Susan,
The answers to the following questions can help us determine the cause of this behavior:
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The answers to the following questions can help us determine the cause of this behavior:
- Do you use standard MS DropDownList control in this case or RadComboBox?
- Did you set AutoPostBack = true for the dropdown when the validation is triggered? Does switching this property to false makes a difference?
Regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Susan
Top achievements
Rank 1
answered on 28 Feb 2009, 06:00 PM
Hi Sebastian,
To answer your questions.
1. RadComboBox
2. Yes, I use Autopostback=true, as it has to load another RadComboBox upon selection of the first.
3. If I remove the autopostback, the validators do not get trigger. However, I need it on the page to load another dropdown.
Thanks for the help!
Susan
To answer your questions.
1. RadComboBox
2. Yes, I use Autopostback=true, as it has to load another RadComboBox upon selection of the first.
3. If I remove the autopostback, the validators do not get trigger. However, I need it on the page to load another dropdown.
Thanks for the help!
Susan
0
Hi Susan,
You need to use ValidationGroups as shown in this online demo.
I hope this will get you started.
Kind regards,
Veselin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You need to use ValidationGroups as shown in this online demo.
I hope this will get you started.
Kind regards,
Veselin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.