How Do I Set Focus To A Field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How Do I Set Focus To A Field

Last post 03-07-2012 08:34 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-07-2012 05:39 AM

    How Do I Set Focus To A Field

    I am trying to use the View.SelectText method to set focus to a field on a View.  However, I keep getting an error:  "The specified values for the View.SelectText call are not valid."  Any ideas what I am doing wrong here?

     I have the following code:

    XPathNavigator newNode = MainDataSource.CreateNavigator().SelectSingleNode(

                                            "/KPS:SYSTEMS/SYSTEM/BOOSTER/STAGE/PropellantMass/AttributeValue/Value/LowerValue",

                                            NameSpaceManager);

    if (newNode != null) {

          CurrentView.SelectText(newNode, "CTRL1424");

    }

  • 03-07-2012 08:34 AM In reply to

    Re: How Do I Set Focus To A Field

    The only thing I could think of would be if CTRL1424 wasn't in your current view - I'm sure you've checked that 100 times though. Oh, I guess you could also get that error if that control isn't bound to the field you are using for the XPathNavigator. I mean, your code looks just like the sample on the MSDN page for the method.

    Hilary Stoupa

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