Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2005

Tip: Looking for answers? Try searching our database.

Repeating sections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PeterJB - 10 Nov 2005 09:55 GMT
Hi

Is there a way of adding a button to a form to insert a section into a
repeating form?  I want a nice user friendly way of adding new sections to
the top only.

Also can i remove cut, copy and paste from the shortcut menu of a repeating
section?

Pete
Franck Dauché - 10 Nov 2005 16:51 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.