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
65
Editor button in embedded Combobox not showing when added at runtime in initializeLayout event
posted

Hi,

I am adding an UltraCombo editor to a cell grid at run time in the initialize layout event.  That all works as advertised and I can get my values from the drop down or add a new entry when I need to.  However, I also need to have an editorbutton on the embedded combobox, also added at runtime.  When I hook that up in the initililizeLayout event on the grid the button does not show up in the combo editor.  However, if I move the initialization of the combobox and the button to the InitializeRow event it all works.

My question is why does the InitilizeLayout event not allow for the combo box button to be added but the same code works in the initializerow event.

I am including a simplified version of the code

Dim ucDropDown As New Infragistics.Win.UltraWinGrid.UltraCombo

Dim utbtnTemp As New Infragistics.Win.UltraWinEditors.EditorButton

ucDropDown.DataSource = SomeDataTable

ucDropDown.ValueMember = "ValueField"

ucDropDown.DisplayMember = "MemberField"

utbtnTemp = New Infragistics.Win.UltraWinEditors.EditorButton With {

.Key = "Column123",

.Text = "..."}

ucDropDown.ButtonsLeft.Add(utbtnTemp)

AddHandler ucDropDown.EditorButtonClick, AddressOf ucDropDown_EditorButtonClick

ucDropDown.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Always

e.Row.Band.Columns("Some Col Name").EditorComponent = ucDropDown

e.Row.Band.Columns("Some Col Name").AutoCompleteMode = AutoCompleteMode.SuggestAppend

e.Row.Band.Columns("Some Col Name").Style = ColumnStyle.DropDown

e.Row.Band.Columns("Some Col Name").ButtonDisplayStyle = UltraWinGrid.ButtonDisplayStyle.Always

ucDropDown.MaxDropDownItems = 12

Thanks

Jannik

Parents
No Data
Reply
  • 21795
    Offline posted

    Hello Jannik,

    I followed the steps you suggested and was unable to reproduce the behavior you're describing. I’ve created a small sample with an UltraGrid. I added UltraCombo as EditorComponent, as you did, in InitializeLayout event. When I start my sample the editor button is visible and functional.

    I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this issue.

    If the project does not work correctly, this indicates either an issue possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using Infragistics for Windows Forms 2017 volume 1. Therefore, could you please let me know the exact version of Infragistics components which you are using?

    If the project does show the product feature working correctly, this indicates a possible issue in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back.

    Please let me know if I can provide any further assistance.

    UltraGridEditor.zip
Children