Hi,
I would like to be able to change the RadioButtonList border color depending on certain conditions from JS.
Here I am looping through all the Rad radio controls and on certain conditions I would like to change the border style for the RadioButtonList.
var allRadControls = $telerik.radControls;
var Found = false;
for (var i = 0; i < allRadControls.length; i++) {
var element = allRadControls[i];
//text Radio
if (Telerik.Web.UI.RadRadioButtonList && Telerik.Web.UI.RadRadioButtonList.isInstanceOfType(element)) {
var items = element.get_items();
var x = element.get_element().parentElement;
// alert(pageview.findControl(element).get_id());
if (element.get_toolTip() == 'y' &&
x.id == pageview.get_id() &&
element.get_selectedIndex() <= 0) {
element.style.color = 'white';
return 'y'
}
else {
Found= 'n'
}
}
}
return Found;
I appreciate the help.
Thanks,.
Omar