Hello,
In our application we have implemented a user control that is widely used for presenting and manipulating data (it simply consists of a UltraGrid for displaying the data and an UltraToolbarsManager which provides tools for data manipulating). We are looking for a way to display this user control as a drop down for grid cells that use lookup tables. It would be nice to do that for two main reasons; first, the user will be able to manipulate the data through the user control and, second, to provide a uniform interface for data management in the application.
Having read about the newly added functionality of ControlContainerEditor in version 9.2, we were wondering if this is the right place to start building. We will need of course to pretty much implement (or use, if it's possible) all the UltraDropDown functionality like AutoComplete, support for Value and Display member, keeping the grid cell focused while the user types in and so on.
Any advice about where and how to start will be greatly appreciated.
Hi Mike,
the new UltraControlContainerEditor is for embedding a control directly inside a grid cell. But it sounds like you want your control to show up as a dropdown in the cell, and not actually in the cell itself. In that case, you don't need the new editor. You can already do this without it.
I, and others, ha've gone over this on the forums about a half a dozen times, so rather than re-type it all here, I will refer you to a recent post that explains how to do it. :)
UltraComboEditor - Can I Use a Custom Control for the DropDown? - Infragistics Community
Or, do a search for "DropDownEditorButton" and you will find a whole bunch more along the same lines.
Thanks for the quick reply.
I followed your advice and created an UltraTextEditor (with a DropDownEditorButton) that I use as the EditorControl for the column. However, when I click the drop down button and the drop down control is displayed, the focus doesn't stay in the grid cell, even though I set the AutoFocus property of the DropDownEditorButton to false. Furthermore, if I click the cell, the dropped down control is closed.
Is this the standard behavior or am I doing something wrong?
Hi,
I'm not sure I understand what you mean. I assume that if you have a control on the DropDownEditorButton that that control will need to get focus at some point. Even if it doesn't get focus when you drop it down, the user will eventually need to give it focus in order to use it, no?
But I'm not really clear on exactly what you mean by "focus" here. That word ha a lot of different meanings. Are you saying that the ActiveCell in the grid is changing?
There's no way to stop this, except what I already said above:
" If you don't want the cell to lose the focus, then you would probably have to use a Control on the DropDownEditorButton that does not accept focus to itself."
I mean I don't want the cell to lose focus,but the control on the DropDownEditorButton gets focus automatically when dropdown. What Can I do?
I'm afraid I don't understand your question. What about it?
How about the Control in DropDownEditorButton getting focus when DropDown automatically?
tidge said:My EditorControl is a UltraTextEditor with a DropDownEditorButton. I Invoke the method ultraGrid1.PerformAction(EnterEditModeAndDropdown) But the control Can't dropdown.
Okay, that's correct. If you are using an DropDownEditorButton, then PerformAction won't work, because the grid doesn't know about the button. That's what I meant above when I said it depends on what kind of button it is.
tidge said:Now the question is that I Can't get the corrent location for DropDownManager to DropDown.
I don't see how DropDownManager will make any difference here. If you are dropping down a control, then the control gets the focus and therefore the cell loses the focus. The DropDownEditorButton already utilizes DropDownManager, so that won't make any difference in terms of focus. If you don't want the cell to lose the focus, then you would probably have to use a Control on the DropDownEditorButton that does not accept focus to itself.