I am trying to use the new ControlContainerEditor to allow me to use my custom control as the control that gets dropped down when a tree node goes into edit mode. I have instantiated my editor and set it as the EditingControl on the ControlContainerEditor but I it never shows up, and the node never goes into edit mode. There is no sample code given for doing this with tree nodes, only grids. Can you please post a small sample of how to do this?
thanks
I got it working using your example but that is not the look and fell I was trying to achieve...
I would prefer if you simply expanded a nodes expansion indicator...a user control would appear...
The whole editor thing is work around that doesn't work for me...
I wish you guys would simply include a control property and node type that accommodated replacing the node's nodes collection with a pane or panel to dump a control onto...
This would vastly improve the usability of the tree control...
Carson
Hi Carson,
Did you try my sample in v8.3? Just change the project reference to point to the versions of the assemblies on your machine. You will also need to change EditorComponent to EditorControl.
I tried it out and it works fine for me. If my sample doesn't work for you on your machine, then my guess is that you are using an older version of the assemblies and you need to get the latest service release.
How to get the latest service release - Infragistics Community
I am using V2 8.3 and it does not drop down for me using the following:
UltraTreeNode addNode; addNode = rootNode.Add("fields", "Fields"); addNode.Override.EditorControl = this.ultraTextEditor1; addNode.Override.UseEditor = Infragistics.Win.DefaultableBoolean.True; addNode.Override.ShowEditorButtons = ShowEditorButtons.Always; addNode.Override.LabelEdit = Infragistics.Win.DefaultableBoolean.True; treeTerrains.Nodes.Add(rootNode);
The text editor has its button and a second tree control as the contained control for that button...
Hi,
Hm, I'm not sure why it's not working for you. I just tested this out with basically the same code you have here and it works fine for me.
I'm attaching my test sample so you can run it and see if the same code works for you.
OK I tried using a simple UltraTextEditor and added a button to the ButtonsRight collection, and set the dropdown button's control to my custom editor. I see the drop down button on each node, but it never drops down or enters edit mode. I must be missing some setting...here is what I have
private void Form1_Load(object sender, EventArgs e){
DropDownEditorButton b = new DropDownEditorButton();b.Control = myEditorControl1;ultraTextEditor1.ButtonsRight.Add(b);ultraTree1.Override.EditorComponent = ultraTextEditor1;ultraTree1.Override.UseEditor = DefaultableBoolean.True;ultraTree1.Override.ShowEditorButtons = ShowEditorButtons.Always;ultraTree1.Override.LabelEdit = DefaultableBoolean.True;}
What else do I have to set to made the nodes start to edit?
thanks!