Hi
I'm using your sample that is posted online and when I paste the code in to VS2017 and Infragistics 16.1 Win CLR4x I get two Errors
Option Strict On Disallows implict conversions from UIElement to EmdeddableUIElementBaseOption Strict On Disallows implict conversions from Object to EmdeddableEditorBase
Swiching Option Strict to Off is not acceptable and it doesn'y help anyway.
Can you tell me why and how do I stop this from happening.
RegardsPaul
From www.infragistics.com/.../infragistics.win.ultrawinlistview~infragistics.win.ultrawinlistview.ultralistviewitem~uielementPrivate Sub ultraListView1_ItemEnteredEditMode(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinListView.ItemEnteredEditModeEventArgs) Handles ultraListView1.ItemEnteredEditMode ' If the embeddable editor for this item supports a dropdown, ' call the DropDown method. Dim embeddableElement As EmbeddableUIElementBase = e.Item.UIElement.GetDescendant(GetType(EmbeddableUIElementBase), e.Item) Dim editor As EmbeddableEditorBase = IIf(Not embeddableElement Is Nothing, embeddableElement.Editor, Nothing) If (Not editor Is Nothing AndAlso editor.SupportsDropDown) Then editor.DropDown() End If End Sub
Hi Paul,
You can resolve this by using CType to cast instead of the As operator. Please let me know if this works for you.
I will look into changing our sample to avoid this error.
Thank you for your reply. I did first attempt the CType with the code shown below but you still get a 'Unable to cast object of type' exception. I've just used a ultraListView1, added an ultraCombox, linked this to the mainColumn.EditorComponent and added 1 Item. You click on the dropdown combo arrow, you get the exception, if you trap the exception and continue the combobox shows.
Look forward to how to correct this.
Dim embeddableElement As EmbeddableUIElementBase = CType(e.Item.UIElement.GetDescendant(GetType(EmbeddableUIElementBase), e.Item), EmbeddableUIElementBase)
Dim editor As EmbeddableEditorBase = CType(IIf(Not embeddableElement Is Nothing, embeddableElement.Editor, Nothing), EmbeddableEditorBase) If (Not editor Is Nothing AndAlso editor.SupportsDropDown) Then editor.DropDown() End If