how to get current row from repeating table. - InfoPath Dev
in

InfoPath Dev

how to get current row from repeating table.

Last post 03-09-2007 09:56 AM by Greg Collins. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-08-2007 03:09 PM

    how to get current row from repeating table.

    OK i have searched and searched, the internet , this forum and nothing has been helpful so far. I have an infopath form with a master/detail repeating section on it. i have just put 2 buttons on the form, one for <previous and one for >next, when i click previous i want the selected item in the master repeating table to move up one row and when i click next i want it to move down one row from where i currently am positioned on the form. I figure i can do this with xpath (unless anyone knows of a better way) but i can't get the current selection, i've tried using current() like this:
    XPathNavigator tempNavigator = navigator.SelectSingleNode("/my:myFields/my:Survey/my:Inspection/my:InspectedAssets/my:InspectedAssetGroup[my:ass_Name = current()]", this.NamespaceManager);
    but i just get the error: XsltContent is needed due to an unrecognizable funtion (or something like that)
    How on earth can i do this??: I am really frustrated with infopath i haven't found one good thing about infopath (excuse my frustration!!)
  • 03-08-2007 03:55 PM In reply to

    Re: how to get current row from repeating table.

    You came to the right place. I have a few Master/Detail example forms you can download and play with to get an idea what to do.

    Specifically the first two should be of interest to you:

    Select a Master Table Row via Code, v1.0
    http://www.infopathdev.com/howto/examples/default.aspx?i=c56d9528ec4f4317a5bd469ac4e90b9d

    Identifying a Filtered Table Row Number, v1.0
    http://www.infopathdev.com/howto/examples/default.aspx?i=cd6b81a217de40a1b249ab42fcff0216

    Paged Master-Detail Table, v1.1
    http://www.infopathdev.com/howto/examples/default.aspx?i=4e0c956598c14f40bc15629faa9c3c32
  • 03-09-2007 09:06 AM In reply to

    Re: how to get current row from repeating table.

    Hi Greg,
    Thanks so much for replying. I am using infopath 2007 and some of the stuff in your examples don't work in 2007 such as the navigator.SelectSingleNode("//my:SelectedMember",this.NamespaceManager).. picking up the selected row. I have never used infopath 2003 so it's a bit hard for me to make sense of some of the objects...
    Any ideas on where i can get some examples that do this for 2007, it seems like it would be SO EASY and it's very frustrating that nothing i try works.
  • 03-09-2007 09:09 AM In reply to

    Re: how to get current row from repeating table.

    Wait a second.. my bad! i thought the selectedMember thing was selecting the current selected row. It's not.. sorry. I am going to try and make something of what you've given me.. if you have any info relating to 2007 on this that would be great.
    Will let you know how it goes.
  • 03-09-2007 09:56 AM In reply to

    Re: how to get current row from repeating table.

    Sorry, I have no IP07 translations at this point... I'm still developing in IP03. Apparently (I've heard) the Microsoft web site has some kind of a conversion chart between IP03 and IP07 object model. I don't know the link though.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.