This is my first foray into the Infragistics controls, so bear with me.
My overall problem is that I will have several rows of potentiall rich content (an image maybe a few blocks of text), and I would like to use a control that displays these rows in a way that allows the user to grab a row and change its order in the sequence. Nesting of rows should be disallowed.
I like the demo of the TreeView control with the countries and continents, and it is most of what I need for something I'm working on.
The only thing is that I do not want to allow the user to put nodes under other nodes. Ok, that was actually easy. I found that in the sample code, so I'm good on this point... and thanks for the good sample code.
But I'd still like to:
- Add more than just an image/tag per row. If I made a user control that represented the layout I want, could I add that as the row contents?
- Remove the dotted lines to the left of each row.
- (optional) Add a border above/below each row. It's moot if I can use a user control for each row as well.
sforcier said:- Add more than just an image/tag per row. If I made a user control that represented the layout I want, could I add that as the row contents?
In the latest release (2009.2), a new control was added, UltraControlContainerEditor, which provides the ability to assign a user control to the node. This also works by assigning an instance of the control to the Override.EditorControl property.
sforcier said:Remove the dotted lines to the left of each row.
Sounds good. I'll give it a shot and update the post... thanks for the fast reply.
I could not get the UltraControlContainerEditor working for me, so I did the following, and it works. A quick confirmation that I'm not committing an aggregious sin would be greatly appreciated.
I have my UserControl (called "SomeSillyThing") with all sorts of stuff in it. I created the following class:
public class MyControlContainerEditor : ControlContainerEditor
{
public MyControlContainerEditor()
this.RenderingControl = new SomeSillyThing();
}
Then on the TreeView I do:
CountryNode = UltraTree1.Nodes.Add(
"Silly");
CountryNode.Override.Editor =
new MyControlContainerEditor();
Does this seem reasonable? Anything I should look out for?
Wow, sorry that code looks all hoarked. Just ignore the whitespaces... that covers the gist.