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
425
ComboEditor based on UltraComboEditor in UltraWinTree
posted

Tried using the following as a reference:

http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/html/WinTree_Embeddable_Editors_Overview.html

The overview is great but unfortunately does not come with samples and the samples that come with the controls don't have a simple example of this implementation.

The following link provided some more direction but I'm still not getting the results I expect http://ko.infragistics.com/community/forums/t/1995.aspx

 

Here is what is currently coded:

aCtlSearch = New CustomSearchCombo 'control that inherits from UltraComboEditor

node.Cells("Value").EditorComponent = aCtlSearch

 

I was expecting this to be straight-forward, but have been pulling out my hair because it won't seem to work.  It looks ok when displayed, but I'm having two problems that seem to tie back to the same core issue - the embedded editor does not appear to be used.  My understanding is that the editor should be acting as the control that is in edit mode.  However, when a method in the CustomSearchCombo it is seeing the Me.Text value as null rather than what has been typed.  Does this need to handled explicitly?  If so, what is the purpose of allowing an embeddable editor if all of the functions that the editor performs cannot be used without explicitly coding for each one (or perhaps I'm missing something key here)?

 

 

Parents
  • 425
    Offline posted

    It looks like I can trap the text change by binding a handler to the EditorWithCombo ValueChanged event.  From there it is possible to explicitly set the aCtlSearch.Text or Value.  This may be alluded to in the prior sample (http://ko.infragistics.com/community/forums/t/1995.aspx) though this sample seemed incomplete (it was getting the editor's value, but not doing anything with it after that).  Is it possible to determine the EditorComponent from within the EditorWithCombo ValueChanged event?  Right now I'm referencing it by using:

    CType(ultParamTree.ActiveCell.EditorComponent, CustomSearchCombo).Value = cboEditor.Value

    Also, what process do you recommend if the Embeddable Editor performs other functions that could result in a change to the value?  For example, CustomSearchCombo has an editor button that loads a modal search form - when this modal form is closed it populates the Value and Text  properties of CustomSearchCombo.  Obviously this will not get reflected back in the EditorWithCombo or tree without coding for it specifically.  If I catch the value changed event of the CustomSearchCombo I can update the EditorWithCombo, but this could result in a circular reference where any change in text/value to EditorWithCombo is then trying to update the CustomSearchCombo again.

    Aside from all of the above, are these approaches over-complicating things?  Is the embeddable editor supposed to be more plug-n-play or any these types of custom changes necessary?

Reply Children
No Data