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
No Data
Reply
  • 18495
    posted

    Hello n2dfire,

    Thank you for contacting Infragistics.

    If you move the code manipulating the UltraGrid columns into the UltraGrid.InitializeLayout event handler and move the code manipulating the UltraDropDown columns into the UltraDropDown.InitializeLayout event, does it work as you expect?

    Whenever you need to set properties of columns in any of the UltraGrid-based controls, you should do it in the InitializeLayout event.

Children