Get current row from within visual studio - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Get current row from within visual studio

Last post 04-16-2007 10:16 AM by Greg Collins. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-13-2007 08:14 AM

    Get current row from within visual studio

    Hello All,
    I have an infopath 2007 form which i host in a visual studio c# windows application. I have a master/detail on my form and a button on the windows form, when i click the winforms button i want to get the currently selected node from the master/detail section but i have no idea how to do this. How do i get the current selected row from outside the infopath form?
    Thanks,
    Erin
  • 04-13-2007 09:46 AM In reply to

    Re: Get current row from within visual studio

    Check out the example forms:

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

    Select a Master Table Row via Code, v1.0
    http://www.infopathdev.com/howto/examples/default.aspx?i=c56d9528ec4f4317a5bd469ac4e90b9d
  • 04-13-2007 10:34 AM In reply to

    Re: Get current row from within visual studio

    Hi Greg,
    thanks for getting back to me, this may be a silly question but the getnamednodeproperty method does not work, the value that i want is inside a node not inside a property. When i try it i just get a blank string back.. here is my code.

    XPathNavigator target = formControl1.XmlForm.MainDataSource.CreateNavigator().SelectSingleNode(Constants.ASSET_INSTANCE_ID,xmlnsm);
    string output = formControl1.XmlForm.MainDataSource.GetNamedNodeProperty( target, "ass_InstanceID" );
  • 04-13-2007 10:46 AM In reply to

    Re: Get current row from within visual studio

    a note for the above...
    should "target" = the whole repeating group? what should this be ? maybe that's where i am going wrong. I am not finding the microsoft explanation helpful
  • 04-16-2007 10:16 AM In reply to

    Re: Get current row from within visual studio

    The target node can be whatever node you want. Often the easiest for myself is to make it the root node. Since you can make up your own property names, you can have as many named properties as you want on any given node.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.