Support Article
Radio button functionality does not work in repeating grid
SA-8911
Summary
User creates a repeating grid with a radio button to select an option from the group. The radio button selected does not pass the the value to clipboard.
Steps to Reproduce
- Get data from the report definition.
- Display data using the repeating grid including the radio button (only a single radio button with true and false).
- Add a post value action for the radio button.
- After submit, check the selected radio button value in the clipboard.
Root Cause
When a radio button is used in a repeating grid, the code explicitly blocks the onclick event generation.
Resolution
Perform the following local change:
Use a check box control instead of a radio button in a repeating grid and customize the code as shown below to work around the current requirement.
<script>
function test(event)
{
var tableID = pega.util.Dom.getElementsById("bodyTbl_right");
var arr = pega.util.Dom.getElementsByClassName("checkbox","input",tableID[0]);
for(var j=0;j<arr.length;j++)
{
arr[j].style.display = "none";
}
}
function test1(event)
{
setTimeout("sample()",0);
}
function sample()
{
var tableID = pega.util.Dom.getElementsById("bodyTbl_right");
var arr = pega.util.Dom.getElementsByClassName("checkbox","input",tableID[0]);
for(var j=0;j<arr.length;j++)
{
arr[j].style.display = "block";
}
}
</script>
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.