We were eagerly awaiting the Q1 release to demonstrate you the new cleaner and more flexible API that makes the work with RadTreeView fun. We also wanted to tell you something more about the benefits that come with the new data engine.
Now that Q1 2011 is public and the improved RadTreeView is a fact, I would like to introduce the enhancements which we implemented during the last few months.
The new data engine that we use in RadTreeView is actually our generic data layer used in RadGridView and other controls such as RadListControl and RadDropDownList. This allowed us to add new features such as filtering and sorting and to improve performance. We also extended the API and now we support new binding modes such as object-relational binding. Using this mode one can bind to a set of objects containing collections of related objects. Despite all these features, now RadTreeView uses half the memory used by the old version.
We did not stop here. Now the user interface is fully customizable and you can even replace the UI elements and create your own.
The new NodeFormatting event is convenient in such scenarios. The next example demonstrates how to change the node color and font on a certain condition.
sender, TreeNodeFormattingEventArgs args)
TreeNodeContentElement element = args.NodeElement.ContentElement;
DataRowView rowView = (DataRowView)args.Node.DataBoundItem;
element.Font = boldFont;
+ args.Node.Text +
+ args.Node.Nodes.Count +
Here is the result:
Another interesting feature is the alternating row coloring.
Just set the AllowAlternatingRowColor and AlternatingRowColor properties to get the result:
.radTreeView1.TreeViewElement.AlternatingRowColor = Color.FromArgb(210, 210, 210);
It is easy to create a property editor using the editing capabilities of RadTreeView. It supports textbox editor, dropdown list editor, spin editor and date time editor and it is easy to add a custom editor or to control and change the editor’s behavior. There is a nice demo regarding this feature in our demo application.
We extended the checkbox support in RadTreeView and now you can mix checkboxes and radio buttons and their behavior is controlled by the control automatically.
Finally, we implemented in RadTreeView our generic drag & drop service. Now it is easy to drag & drop items between trees or other controls.
We believe that you will like these new features. As always we appreciate your feedback and we will be glad to know if you have some new ideas to share.