Hey all,
A common subject is how to validate that a RadListBox with CheckBoxes="true" have at least one item checked (not selected).
Here is a post that explains a good solution to make it work.
http://www.telerik.com/community/forums/aspnet-ajax/listbox/radlistbox-checkboxes-true-and-requiredfieldvalidator.aspx
The solution above says we need to remove the ControlToValidate from the CustomValidator attached to the RadListBox.
This would work great unless you happen to use validation callout extenders to show a tooltip over invalid fields. In this case, in order to position the tooltip, the validator must have a _controlToValidate property.
So how do we get the RadListBox to work with validation callout extenders? In our case we dynamically add our validators to the page with extension methods. I suppose we could add a custom attribute to the validators that would be like ControlToValidate2="rlbStates" and the callout extender could check this property if ControlToValidate was null...
Any ideas that are more "built-in" and less "hacky"?
Thanks!
Thad
A common subject is how to validate that a RadListBox with CheckBoxes="true" have at least one item checked (not selected).
Here is a post that explains a good solution to make it work.
http://www.telerik.com/community/forums/aspnet-ajax/listbox/radlistbox-checkboxes-true-and-requiredfieldvalidator.aspx
The solution above says we need to remove the ControlToValidate from the CustomValidator attached to the RadListBox.
This would work great unless you happen to use validation callout extenders to show a tooltip over invalid fields. In this case, in order to position the tooltip, the validator must have a _controlToValidate property.
So how do we get the RadListBox to work with validation callout extenders? In our case we dynamically add our validators to the page with extension methods. I suppose we could add a custom attribute to the validators that would be like ControlToValidate2="rlbStates" and the callout extender could check this property if ControlToValidate was null...
Any ideas that are more "built-in" and less "hacky"?
Thanks!
Thad