<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: C# Select a row in a repeating table - part 2</title><link>https://www.infopathdev.com:443/forums/thread/13678.aspx</link><pubDate>Wed, 12 Oct 2005 23:30:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13678</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13678.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13678</wfw:commentRss><description>Always glad to be able to help!&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: C# Select a row in a repeating table - part 2</title><link>https://www.infopathdev.com:443/forums/thread/13677.aspx</link><pubDate>Mon, 10 Oct 2005 22:19:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13677</guid><dc:creator>mmelonis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13677.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13677</wfw:commentRss><description>That worked thanks. I removed the line of code using .firstChild(). &lt;br /&gt;&lt;br /&gt;Mike M.</description></item><item><title>Re: C# Select a row in a repeating table - part 2</title><link>https://www.infopathdev.com:443/forums/thread/13676.aspx</link><pubDate>Fri, 30 Sep 2005 16:14:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13676</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13676.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13676</wfw:commentRss><description>The first parameter for SetNamedNodeProperty() needs to be the node to the table... or in your case I believe it should be //Patient. It should not be any of the row nodes.&lt;br /&gt;&lt;br /&gt;Also, for future reference, using .firstChild() is a bad habit because it could be a #TEXT node like a TAB or something else. It may not be an actual element. It is better to use a full XPath where ever possible, such as Patient/PatientCaseFile[1] ... where [1] specifies the first instance of PatientCaseFile.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: C# Select a row in a repeating table - part 2</title><link>https://www.infopathdev.com:443/forums/thread/13675.aspx</link><pubDate>Fri, 30 Sep 2005 14:35:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13675</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13675.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13675</wfw:commentRss><description>You might be right on using the wrong Ctrl-ID if nothing is happening. It's easier than your making it out to be. &lt;br /&gt;&lt;br /&gt;1) Double-click on your button in design mode.&lt;br /&gt;2) The ctrl-ID of the button is in the box labeled "ID:" - You can even change it to something like "but_patient_goto" if you want to make your code more easily understandable.&lt;br /&gt;&lt;br /&gt;If this doesn't work, I don't know how much help I can lend you, I have pretty much no experience with master/detail tables - but they sound cool! Good luck.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;</description></item><item><title>C# Select a row in a repeating table - part 2</title><link>https://www.infopathdev.com:443/forums/thread/12592.aspx</link><pubDate>Thu, 29 Sep 2005 14:27:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12592</guid><dc:creator>mmelonis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12592.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12592</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I've been attempting to implement the suggestions discussed in&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=450&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=450&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and the discussion topic:&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/downloads/free/default.aspx?i=c56d9528ec4f4317a5bd469ac4e90b9d&gt;http://www.infopathdev.com/downloads/free/default.aspx?i=c56d9528ec4f4317a5bd469ac4e90b9d&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, I must be missing some key point. In Infopath, I have a Master/Detail. Also, I have a row number text box. When a user enters a row number and press the corresponding 'Goto' button, I want the Master record found at the give row number to be selected. This is very similar to the discussion topic written up by Greg Collins. My guess is that I'm using the wrong CtrlID. However, I'm not sure what else to try.&lt;br /&gt;&lt;br /&gt;My code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private string _patientChartCrtlID = "CTRL1_6";&lt;br /&gt;private IXMLDOMNode _patientChartNodes = null;&lt;br /&gt;&lt;br /&gt;[InfoPathEventHandler(MatchPath="CTRL110_6", EventType=InfoPathEventType.OnClick)]&lt;br /&gt;public void CTRL110_6_OnClick(DocActionEvent e)&lt;br /&gt;{&lt;br /&gt;			&lt;br /&gt;	try&lt;br /&gt;	{&lt;br /&gt;&lt;br /&gt;	        _patientChartNodes = thisXDocument.DOM.selectSingleNode("//Patient");&lt;br /&gt;		_patientChartNodes = thisXDocument.DOM.firstChild;&lt;br /&gt;			&lt;br /&gt;&lt;br /&gt;		string newRow = thisXDocument.DOM.selectSingleNode("//my:Goto").text;&lt;br /&gt;&lt;br /&gt;		&lt;br /&gt;		thisXDocument.SetNamedNodeProperty(_patientChartNodes, _patientChartCrtlID, newRow);&lt;br /&gt;				&lt;br /&gt;	}&lt;br /&gt;	catch(System.Exception ex)&lt;br /&gt;	{&lt;br /&gt;		thisXDocument.UI.Alert(ex.ToString());&lt;br /&gt;	}&lt;br /&gt;			&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The line in the view.xsl file that I believe that I'm suppose to use to retrieve the CtrlID is:&lt;br /&gt;&amp;lt;table class="xdRepeatingTable msoUcTable xdMaster" title="" style="TABLE-LAYOUT: fixed; WIDTH: 594px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-COLLAPSE: collapse; WORD-WRAP: break-word; BORDER-BOTTOM-STYLE: none" border="1" xd:CtrlId="CTRL1_6" xd:masterID="CTRL1_6"&amp;gt;&lt;br /&gt;&lt;br /&gt;My XML tree is&lt;br /&gt;Patient has many PatientCaseFiles&lt;br /&gt;PatientCaseFile has many PatientCharts&lt;br /&gt;&lt;br /&gt;Patient&lt;br /&gt;   PatientCaseFile&lt;br /&gt;       PatientChart&lt;br /&gt;&lt;br /&gt;The list of Patients are displayed by the master the record and I'm trying to goto a specific Patient Row. The net effect of the code above is nothing happens. The current row selected is the same as it was prior to hitting the 'Goto' button.&lt;br /&gt;&lt;br /&gt;Any help or in-sights would be much appreciated.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Mike M.</description></item></channel></rss>