Detecting master/detail row index via FormEvents_ContextChanged - InfoPath Dev
in

InfoPath Dev

Detecting master/detail row index via FormEvents_ContextChanged

Last post 02-22-2011 09:10 AM by silentoption. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-14-2011 07:27 PM

    Detecting master/detail row index via FormEvents_ContextChanged

    Using the 2010 C# object model, I need to detect which row of a master repeating table was clicked via the FormEvents_ContextChanged Event.  Is this possible?  I cannot find any specific examples on the web.  Any help would appreciated.

    What I was thinking:

    public void FormEvents_ContextChanged(object sender, ContextChangedEventArgs e)

    {

    switch (e.ChangeType)

    {

    case "ContextNode":

    if (e.Context.LocalName == "grpScorecard") //root of repeating table

    {

    //DETECT ROW ID HERE...

    }

    break;

    }

    }

     Thank you in advance!

  • 02-21-2011 12:21 AM In reply to

    Re: Detecting master/detail row index via FormEvents_ContextChanged

    I'm guessing you have InfoPath 2010 browser running on SharePoint 2010. You should be able to do this - that's what the event was created for. We do this in the rich client all the time but not for master-detail. Doing it for a repeating table is easy and it's relatively straightforward to set up a master/detail that does not use the master/detail control (rather two repeating tables or sections).

    I believe Greg Collins has some blog posts and samples that show how to get the current context. Please search around for that. If you can't find anything, please send me email.

    Patrick Halstead
    Project Manager at Qdabra
  • 02-22-2011 09:10 AM In reply to

    Re: Detecting master/detail row index via FormEvents_ContextChanged

    Thanks for the direction Patrick.  I'll have a look at Greg's posts...

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.