Browse Dialog Search Text


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi there.

I hope I will be told that I shouldn't be doing what I am doing, but I am using the SearchValueChanged for things like these. Smile

I did have to make a small change into the BrowseDialog source code, since the OK button wouldn't trigger the SearchValueChanged for the control that had the last focus, being this a search field. What I did was to create a text control in the BD form and I move the focus to it and then back to where it was when the OK is pressed.

This is what I do in the SearchValueChanged:



    Private Sub YourBrowseDialog_SearchValueChanged(ByVal sender As Object, _
                ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogSearchValueChangedEventArgs) _
                Handles Me.SearchValueChanged
        '-- check if a combo was chosen
        If e.SourceSearchField.Key.Equals("YourComboValueField")
            '-- Establish locals
            Dim yourInteger as Integer
 
            '-- get the value
            yourInteger = CType(CType(e.SourceControl, ComboBox).SelectedValue, Integer)
          
           '-- do whatever needed
        End If

        '-- check if a Text was chosen
        If e.SourceSearchField.Key = "YourTextField" Then
            '-- Establish locals
            Dim yourText As String

            '-- get your text
            yourText = e.SourceControl.Text
        End If
       
        '-- and so on...
    End Sub

Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, through the BrowseDialog control itself, no.  This would require that the values are passed back through an event.  However, if you have a BrowseInformationPanel in the browse dialog, you can actually get to the entire form from there including the fields.  There is a property called "this.BrowseDialogWindowReference" that will give you a direct reference to the dialog.  At that point, you can get to pretty much anything you want.
Mike Tomlin
Mike Tomlin
StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)
Group: StrataFrame Users
Posts: 23, Visits: 5.8K
Is there a way to access the text or selections a user makes in the Browse Dialog search fields so I can record what they actually entered as search criteria?

Thanks

Mike
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search