Support Article
Radio Button Configuration Issue in Repeat Grid
SA-16840
Summary
User is using repeating grid layout, radio button event is not working as per configurations made on action tab of radio button cell properties.
Error Messages
No error message displayed, but expected behavior missing from configuration.
Steps to Reproduce
1. Add a repeat grid layout in Section rule.
2. Configure the source of Repeat grid as a list property.
3. Set one of the columns as a radio button using out-of-the-box (OOTB) Radio button Control.
4. Onclick or Onchange of the radio button, do section refresh.
Root Cause
This is an expected behavior . There is an action, "Grids.getActiveGrid(event).setOtherRadioToFalse(this, event )" , harcoded on the radiobutton present in the grid.
Resolution
Requirement is to trigger the refreshSection onClick of radio button.
Use below script to achieve the same. Add this script in the section where grid is configured:
<script>
var radioButtons = document.getElementsByTagName('input');
for(var i=0;i<radioButtons.length;i++)
{
if(radioButtons[i].type=='radio')
{
var attribut= radioButtons[i].getAttribute("onclick");
if(attribut=="Grids.getActiveGrid(event).setOtherRadioToFalse(this, event );")
{
radioButtons[i].addEventListener("click", function(){
pega.u.d.refreshSection("SecondSection",",");
});
}
}
}
</script>
Published January 31, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.