Hilary,
I can really use this solution but I am struggling trying to get it to work. I am not sure if it is the structure of my XML file or something else. I run this on button clik
XPathNavigator parent = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:CommoditySummary/my:Line_Items", NamespaceManager);
//get our repeating group from sampledata.xml
XmlDocument sample = new XmlDocument();
sample.Load(this.Template.OpenFileFromPackage("CmdtyRow.xml"));
XPathNavigator newGroup = sample.CreateNavigator().SelectSingleNode("/my:myFields/my:CommoditySummary/my:Line_Items/my:Commodity", NamespaceManager);
parent.AppendChild(newGroup) XPathNavigator parent = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:CommoditySummary/my:Line_Items", NamespaceManager);
//get our repeating group from sampledata.xml
XmlDocument sample = new XmlDocument();
sample.Load(this.Template.OpenFileFromPackage("CmdtyRow.xml"));
XPathNavigator newGroup = sample.CreateNavigator().SelectSingleNode("/my:myFields/my:CommoditySummary/my:Line_Items/my:Commodity", NamespaceManager);
parent.AppendChild(newGroup); // here I get an error value cannot be null Parameter name: newChild
Any suggestions?