Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
725
Converting UltraCombo to UltraDropDown
posted

I'm currently working on a project that initially used a form to display data in Text Boxes & UltraComboBoxes

I am now trying to convert from using a Form to using an UltraWinGrid in CardView Mode.

My biggest issue for now is replicating all the Filter/Complete behavior I had on the UltraCombo in the new UltraDropDown control for the grid.

In the Form Version I have this in the Form Init routine

        With ucb_EMSName
            .DataSource = _stcodes
            .ValueMember = "Station"
            .DisplayMember = "Station"
        End With

And then the following control init

    Private Sub ucb_EMSName_InitializeLayout(sender As Object, e As UltraWinGrid.InitializeLayoutEventArgs) Handles ucb_EMSName.InitializeLayout
        With ucb_EMSName
            .DisplayLayout.Bands(0).Columns("Station").Header.VisiblePosition = 0
            .DisplayLayout.Bands(0).Columns("Code").Header.VisiblePosition = 1
            .AutoCompleteMode = AutoCompleteMode.Suggest
            .AutoSuggestFilterMode = AutoSuggestFilterMode.Contains
            .CharacterCasing = CharacterCasing.Upper
            .DropDownStyle = UltraWinGrid.UltraComboStyle.DropDown
        End With
    End Sub

This works fine on the form by automatically filtering the drop down list as the user types in the control.

For the Grid version I have tried to replicate it with the following

In the form init routine

        With udd_EMSName
            .DataSource = _stcodes
            .ValueMember = "Station"
            .DisplayMember = "Station"
            .DisplayLayout.Bands(0).Columns("Station").Header.VisiblePosition = 0
            .DisplayLayout.Bands(0).Columns("Code").Header.VisiblePosition = 1
        End With

        With ug.DisplayLayout.Bands(0).Columns("Station")
            .ValueList = udd_EMSName
            .AutoCompleteMode = AutoCompleteMode.Suggest
            .AutoSuggestFilterMode = AutoSuggestFilterMode.Contains
            .CharacterCasing = CharacterCasing.Upper
        End With

And the following control init

    Private Sub udd_EMSName_InitializeLayout(sender As Object, e As UltraWinGrid.InitializeLayoutEventArgs) Handles udd_EMSName.InitializeLayout
        With udd_EMSName
            .DisplayLayout.Bands(0).Columns("Station").Header.VisiblePosition = 0
            .DisplayLayout.Bands(0).Columns("Code").Header.VisiblePosition = 1
        End With
    End Sub

This simply gives me a 2 column drop down with no filtering.

I know this should be simple but what am I missing?

Parents Reply Children
No Data