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