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 / March 2006

Tip: Looking for answers? Try searching our database.

row position

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BFSmith - 22 Mar 2006 15:19 GMT
I have a repeating table with a button in it...how can I find the row
position that contains the button using OnAfterChange? Or a combination of
Rules/Code?  There may have been rows that were deleted prior to using the
button. The namespace for the repeating table is the tblRADetail from:

/dfs:myFields/dfs:dataFields/d:tblRAHeader/d:tblRADetail

Also-I may need to <press> the button more than once over the life of the
form.
Greg Collins [InfoPath MVP] - 23 Mar 2006 19:36 GMT
Clicking a button in a repeating table -- the context for the button is the row itself.

So if you have

group1
  group2
     field1
     etc.

and you have a button in the table row... when you click the button, your context (eventObj.Site / e.Site) is group2.

Hope that helps.

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

I have a repeating table with a button in it...how can I find the row
position that contains the button using OnAfterChange? Or a combination of
Rules/Code?  There may have been rows that were deleted prior to using the
button. The namespace for the repeating table is the tblRADetail from:

/dfs:myFields/dfs:dataFields/d:tblRAHeader/d:tblRADetail

Also-I may need to <press> the button more than once over the life of the
form.
Greg Collins [InfoPath MVP] - 23 Mar 2006 19:39 GMT
Sorry - I gave you the wrong information. Buttons have a Source, but not a Site.

In your OnClick event handler, you can try this:

JSCRIPT:
   XDocument.UI.Alert(eventObj.Source.nodeName);

C#:
   thisXDocument.UI.Alert(e.Source.nodeName);

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

Clicking a button in a repeating table -- the context for the button is the row itself.

So if you have

group1
  group2
     field1
     etc.

and you have a button in the table row... when you click the button, your context (eventObj.Site / e.Site) is group2.

Hope that helps.

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

"BFSmith" <BFSmith@discussions.microsoft.com> wrote in message news:18F89042-B57A-42BA-BA7C-2CDACA19BA31@microsoft.com...
I have a repeating table with a button in it...how can I find the row
position that contains the button using OnAfterChange? Or a combination of
Rules/Code?  There may have been rows that were deleted prior to using the
button. The namespace for the repeating table is the tblRADetail from:

/dfs:myFields/dfs:dataFields/d:tblRAHeader/d:tblRADetail

Also-I may need to <press> the button more than once over the life of the
form.

BFSmith - 23 Mar 2006 20:28 GMT
tnx - but - that gives me: "d:tblRADetail" - not the row position

I'm fiddling with writing the row position into a Support 2ndairy ds ...like
you showed as a resource file in a previous example...using:

count(../preceding-sibling::d:tblRADetail/@Piece) + 1

to set a row position in a field seems to work....havent connected the
2ndairy ds into my code yet tho...

I wish there was a property of eventObj that brought back the row # of the
repeating group...that would be a nice feature

> Sorry - I gave you the wrong information. Buttons have a Source, but not a Site.
>
[quoted text clipped - 18 lines]
>
> Hope that helps.
BFSmith - 23 Mar 2006 21:49 GMT
hmmm...Greg-I've got the proper row position stored in /Support/RowPosition
but am having trouble retrieving it from code...

I think I have a namespace issue....syntax must be different than getting
data from ado data fields

> tnx - but - that gives me: "d:tblRADetail" - not the row position
>
[quoted text clipped - 31 lines]
> >
> > Hope that helps.
BFSmith - 24 Mar 2006 15:36 GMT
got it using :
    //Get the RowPosition out of the Suupport.xml resource file...written to by
a rule on the button
    var dat0 = XDocument.DataObjects("Support").DOM;
    iRow = dat0.selectSingleNode("//RowPosition").text;

> hmmm...Greg-I've got the proper row position stored in /Support/RowPosition
> but am having trouble retrieving it from code...
[quoted text clipped - 37 lines]
> > >
> > > Hope that helps.
 
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.