Disable Cut ,Paste in the Repeating Table menu - InfoPath Dev
in

InfoPath Dev

Disable Cut ,Paste in the Repeating Table menu

Last post 01-25-2007 11:22 PM by Helsie. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-10-2006 05:12 AM

    Disable Cut ,Paste in the Repeating Table menu

    Dear Infopath knights,

    In repeating table Properties dialog,the Customize Commands button allows me to customize "Insert","Insert above", "Remove" and so on.
    But I need to disable the "Cut","Copy" and "Paste" option in the section menu which is not possible.

    Any help???


    Thanks in advance
    Regards,
    Abhishek
  • 01-10-2006 07:52 AM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    Hi,

    I don't know if it's possible by this way but you can try:

    Infopath let you hide some toolbar and menu with a little bit chance you can hide what you want !

    try:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/OfficeInfoPathCustomizingInfoPathMenusandToolbars.asp

    ++

    Thierry



    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 01-10-2006 09:53 AM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    If you double-click the repeating table and uncheck the box labeled "Allow users to insert and delete rows" it should accomplish this. Since Cut, Copy, Paste are just advanced insertion and deletion functions you cannot have one without the other. If you are planning to allow users to insert/delete into the repeating section why wouldn't you want to let them cut/copy/paste? Removing this would just be cutting out useful features.

    By the way, thanks for "Knighting" us, haha.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-10-2006 07:50 PM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    You can add custom buttons that specifically do the insert.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 01-11-2006 05:11 AM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    Hi MFaus,
    I allow users to insert rows(using built in Insert commands),but I dont allow them to delete rows using the in-built "Remove" option.
    I provide a custom delete button to only certain rows based on conditions.
    So I dont want the "Cut" option to those rows which dont satisfy my conditions.
    Even though I have disabled the "Remove" and "Remove All" option,the "Cut" option still appears in the menu.
    So the best option would be to to disable the " Allow users to insert/delete into the repeating section" check box
    and provide a custom Insert button.

    Thanks a lot,
    regards,
    Abhishek
  • 01-11-2006 06:46 AM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    Hi,

    Otherwise you can make an onbeforechange event that stop the delete of the section:

    [InfoPathEventHandler(MatchPath="/AV/AVel/Sitz", EventType=InfoPathEventType.OnBeforeChange)]
    public void AVel_Sitz_OnBeforeChange(DataDOMEvent e)
    {

    if (e.Operation == "Delete" )
    {
    e.ReturnStatus = false;
    e.ReturnMessage = "You cannot do this sorry!";
    }


    }


    The option is always hier but you cant use it!

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 01-11-2006 08:41 PM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    Thank you very much Virgul,

    Regards,
    Abhishek
  • 01-23-2007 11:19 PM In reply to

    • Helsie
    • Not Ranked
    • Joined on 01-23-2007
    • Netherlands
    • Posts 7

    Re: Disable Cut ,Paste in the Repeating Table menu

    I'm sorry for bringing up this very old topic, but I wonder if anybody could give me a short hint how I could create insert/delete buttons using Jscript?

    I want to have a delete button on each row of the repeating table to delete the row where it is and the insert button will be placed outside the repeating table.

    Many thanks for any help!
  • 01-24-2007 02:14 PM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    Hi Helsie and welcome to our forum!
    Is it ok if the buttons are in the toolbar? Adding buttons to toolbar is pretty straightforward. You can also add buttons to the view that add and delete items but that requires some code. Finally, the taskpane is another place, but this too will require some code.
    Patrick Halstead
    Project Manager at Qdabra
  • 01-24-2007 04:35 PM In reply to

    • Helsie
    • Not Ranked
    • Joined on 01-23-2007
    • Netherlands
    • Posts 7

    Re: Disable Cut ,Paste in the Repeating Table menu

    Hi Patrick,
    unfortunately I think (am sure ;) ) that our (internal) customer wants to have the insert & delete buttons inside (for delete) or around (for insert) the repeating tables. The problem is that I use 4 different instances of repeating tables in my form and if I have delete & insert in the toolbar or in the taskpane, it will not be convenient enough for the users. Additionally I want to use conditional formatting to activate or deactivate this delete button for the first 3 instances in the repeating table (because those are lines that should not be deleted)...

    Basically, my "root issue" is: A repeating table where the first 3 entries are pre-filled (when opening the form) and it should not be possible to delete any of those 3 and all other entries may be added or deleted as much as the user likes...
    Using the expression 'position()=1' (till 3) didn't work: it seems to return 1 for all repeating table rows, so it will always disable adding or deleting...
  • 01-24-2007 04:42 PM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    Hi Helsie,

    Do you have 2 issues? Is it just about the buttons, or do you need to also limit delete? Are the buttons more important, or were they just one way you thought of to handle the problem?

    We've done what you are describing many times, so it is very possible to do this. If you'd like some quick-turnaround hands-on assistance to solve your problem, check out our Support packs http://www.qdabra.com/products.asp?cat=12).

    Cheers!
    Patrick Halstead
    Project Manager at Qdabra
  • 01-24-2007 04:47 PM In reply to

    • Helsie
    • Not Ranked
    • Joined on 01-23-2007
    • Netherlands
    • Posts 7

    Re: Disable Cut ,Paste in the Repeating Table menu

    quote:
    Originally posted by Patrick Halstead

    Hi Helsie,

    Do you have 2 issues? Is it just about the buttons, or do you need to also limit delete? Are the buttons more important, or were they just one way you thought of to handle the problem?
    Limiting the delete is the main issue. :) Buttons would be one way to do it, based on reading (a lot of) forum topics.

    quote:
    We've done what you are describing many times, so it is very possible to do this. If you'd like some quick-turnaround hands-on assistance to solve your problem, check out our Support packs http://www.qdabra.com/products.asp?cat=12).

    Cheers!

    Would it be possible to do this in a 1-hour support session? If yes, I could talk to my manager, since this is a very important form for our organisation, so it could be they might even spare some money for it! ;)
  • 01-24-2007 05:37 PM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    You can just change the schema to have a minOccurs=3 and that will limit the delete using the default widgets.
    Please try that and let me know if it works.
    Patrick Halstead
    Project Manager at Qdabra
  • 01-25-2007 07:28 AM In reply to

    • Helsie
    • Not Ranked
    • Joined on 01-23-2007
    • Netherlands
    • Posts 7

    Re: Disable Cut ,Paste in the Repeating Table menu

    Nope it did not work. Because when I limit to three, I can still delete the first three, as long as I've added 3 new lines before deleting those first three...
  • 01-25-2007 06:05 PM In reply to

    Re: Disable Cut ,Paste in the Repeating Table menu

    oh, I was confused. For that, you should just add conditional formatting to make it read only if position() is 1. Just use xpath for the conditional expression.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 2 (18 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.