Hi Peter,
You ca do this by code using behind your button:
IXMLDOMDocument2 templateDom = (IXMLDOMDocument2)thisXDocument.CreateDOM();
templateDom.validateOnParse = false;
templateDom.load("template.xml");
templateDom.setProperty("SelectionNamespaces",
"xmlns:my='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-10T17-59-19'");
IXMLDOMNode oTemplateGrp =
templateDom.selectSingleNode("/my:myFields/my:group1/my:group2");
IXMLDOMNode oTemplateNode = oTemplateGrp.cloneNode(true);
IXMLDOMNode oGroup1 =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:group1");
oGroup1.appendChild(oTemplateNode);
You can also move items up and down your table (I think that it is what you
are after):
http://blogs.msdn.com/infopath/archive/2005/02/23/378968.aspx
Hope that it helps.
Regards,
Franck Dauché
> Hi
>
[quoted text clipped - 6 lines]
>
> Pete
PeterJB - 11 Nov 2005 09:35 GMT
Thanks Franck
I am actually trying to prevent users from doing anything except add an item
to the top of the repeating section (sort of like a stack of sections).
Can I get rid of the copy/paste/cut in the shortcut menu?
Pete
> Hi Peter,
>
[quoted text clipped - 31 lines]
> >
> > Pete
Franck Dauché - 11 Nov 2005 18:20 GMT
Hi Peter,
Why don't you just uncheck: "Allow users to insert and delete rows" and
manage row additions with your custom button?
Franck
> Thanks Franck
>
[quoted text clipped - 40 lines]
> > >
> > > Pete