I want to set EditorWithCombo editor to the cells of a column. But the list items of the combo boxes are different. How can I manage the ValueList in this case?
Typically one handles the BeforeCellEnterEditMode event, and changes the contents of the associated ValueList therein.
Brian, I have the same situation here and I can't seem to figure out how to modify the contents of the control's value list - the object is ReadOnly...Should I initialize a new UltraComboEditor with a new Valuelist and bind it to the cell? How do I get rid of the initial control in this case? Thanks!
Hi,
exelonbsc said:Brian, I have the same situation here and I can't seem to figure out how to modify the contents of the control's value list - the object is ReadOnly...Should I initialize a new UltraComboEditor with a new Valuelist and bind it to the cell? How do I get rid of the initial control in this case? Thanks!
I'm not really sure I understand your question.
To change the items on the UltraComboEditor's ValueList, you would typically use the control's Items collection.
You could also change the EditorComponent property of the cell to a new UltraComboEditor if that works better for you. To get the original UltraComboEditor (if there is one), you would use the EditorComponent property.
Mike, to clarify - I am binding UltraComboEditor to a cell (with cell-specific ValueList) within the tree_InitializeDataNode() handler. The list shows up fine but the contents of the list should change depending on values selected in the neighboring cells. If I look at a cell from within tree_CellValueChanged() I see that both cell.Editor and cell.EditorComponent are not initialized and the only cell property that is - is cell.EditorResolved, which is initialized to a Infragistics.Win.EditorWithCombo with a ValueList inside of it (see the screenshot) and that ValueList instance is read only. So my question was how to change the contents of that ValueList dynamically. Thanks.
If you set the EditorComponent property on a cell to an UltraCombo (or anything), then when you read the EditorComponent property of that same cell, you will get back the same UltraCombo (ow whatever) you assigned to it. If you are not getting that, then you must be looking at the wrong cell.