Hallo,
i have the following problem:
I developed a form with many fields and several views. One view is for searching values in secondary datasources. After searching for a value into this search view, the user can click a button for selecting a value and for returning to the calling view. All of this works fine, but when i have switched the view, i am at the beginning and not at the position where i started. So i tried to select the Text field, where i have started the search with SelectText, but i get an error at this place. If i use the code directly bound on a button it works.
Here is the code (VB)
Public Sub CTRL95_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
Dim field As XPathNavigator = Me.CreateNavigator().SelectSingleNode("/my:Daten/my:Artikel/my:Vorratsdaten/my:suno", Me.NamespaceManager)Dim SelectedValue As String = e.Source.SelectSingleNode("T_x0024_SUNO").Value
field.SetValue(SelectedValue)
Me.ViewInfos.SwitchView(Me._OldView)
Me.CurrentView.ForceUpdate()
CurrentView.SelectText(field)
End Sub