Hi,
I think your radio button is binded to the field out of repeating section. Make sure that the radio button field is in the repeating section in the data source. And use the following code in the field on after change.
[InfoPathEventHandler(MatchPath = "/my:myFields/my:group3/my:group4/my:field7", EventType = InfoPathEventType.OnAfterChange)]
public void group4_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo || e.Parent.nodeName != "my:field7" || e.Site.text != "1")
{
return;
}
if (e.Source.text == "1")
{
IXMLDOMNode parentNode = e.Source.selectSingleNode("..");
int currentRowPosition = parentNode.selectNodes("../precedingsibling::my:group4").length + 1;
IXMLDOMNodeList field7Nodes = thisXDocument.DOM.selectNodes(string.Format("/my:myFields/my:group3/my:group4[position() != {0}]/my:field7[. = '1']", currentRowPosition));
foreach (IXMLDOMNode field7Node in field7Nodes)
{
field7Node.text = "0";
}
}
}
Here my:group4 is the repeating field and my:field7 is the radio button field.