ADD. RadTreeView - add NodeRemoving event
ADD. RadTreeView - add functionality to prevent the horizontal auto-scrolling when longer nodes are clicked Comment: The new RadTreeViewElement.AutoScrollOnClick property disables the horizontal scrolling when clicking with the mouse on a tree node
ADD. RadTreeView - add drag and drop functionality in bound mode too
RadTreeView - export, print content possible supported file types: pdf, excel, html
When you clear the child nodes of any node, the RadTreeView is scrolling to its initial position.
Allow drag and drop of RadTreeView's nodes in bound mode
Add CheckedNodes collection of RadTreeView that contains all checked nodes.
To reproduce: radTreeView1.Filter = "new"; var node = new RadTreeNode( "test" ); radTreeView1.Nodes.Add( node ); //here the node is not in the Nodes collection if ( radTreeView1.Nodes.Contains( node ) == false ) { radTreeView1.Nodes.Add( new RadTreeNode( "test" ) ); } Workaround: remove the filter, perform the desired check and restore the filter
Currently we do not support binding to the ToggleState.Indeterminate state automatically because it would require a change in the behavior of the Checked property. If you use the CheckedMember, the ToggleState.Indeterminate state is represent like ToggleState.On. Workaround: Subscribe to the NodeFormatting and NodeCheckedChanged events: void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e) { Child child = e.Node.DataBoundItem as Child; if (child != null) { e.Node.CheckState = child.Status; } } void radTreeView1_NodeCheckedChanged(object sender, Telerik.WinControls.UI.TreeNodeCheckedEventArgs e) { Child child = e.Node.DataBoundItem as Child; if (child != null) { child.Status = e.Node.CheckState; } }
When using TriStateMode with AutoCheckChildNodes, there is no way to determine whether the events are raised by a user action or by programatically checking a node. view: CheckedMode enumeration for details
So is there an event triggered for added nodes when using a datasource? I want to set the checked state based on a property on the databound item. Basically this: I have a treeview set like this in Q1 2012: treeViewProjets.DataSource = ViewModel.Projets; treeViewProjets.DisplayMember = @"Nom\Nom"; treeViewProjets.ValueMember = @"Id\Id"; treeViewProjets.ChildMember = @"Projets\ObjetsProjet"; treeViewProjets.NodeAdded += new RadTreeView.RadTreeViewEventHandler(treeViewProjets_NodeAdded); treeViewProjets.NodeAdding += new RadTreeView.RadTreeViewCancelEventHandler(treeViewProjets_NodeAdding); treeViewProjets.NodeFormatting += new TreeNodeFormattingEventHandler(treeViewProjets_NodeFormatting); I get a root node and many child nodes created, but the events NodeAdded and NodeAdding are never triggered, NodeFormatting triggers fine.
ADD. RadTreeView - when pressing a letter from the keyboard, the node starting with this letter should be selected. Resolution: Added two new properties: KeyboardSearchEnabled and KeyboardSearchResetInterval. When set the KeyboardSearchEnabled property to true, user can navigate to an item by typing when RadTreeView is focused. You can set how long the user must wait before searching with the keyboard is reset using the KeyboardSearchResetInterval property.
Improve the drag and drop indicators by giving more clean user friendly design and positioning.
RadTreeView. Add node templates as ASP.NET AJAX - http://www.telerik.com/help/aspnet-ajax/treeview-templates-structure.html
Scenario: We have an object P which has two lists of child objects of types C1 and C2. If we create a list of P and we try to bind the tree to this list and display the two lists as child nodes, we will not succeed.
Workaround: class CustomTreeView : RadTreeView { //Replace the default element with the custom one protected override RadTreeViewElement CreateTreeViewElement() { return new CustomTreeViewElement(); } //Enable theming for the control public override string ThemeClassName { get { return typeof(RadTreeView).FullName; } } } class CustomTreeViewElement : RadTreeViewElement { //Enable themeing for the element protected override Type ThemeEffectiveType { get { return typeof(RadTreeViewElement); } } protected override bool ProcessContextMenu(Point location) { RadTreeNode node = this.GetNodeAt(location); if (node == null) { RadContextMenu menu = new RadContextMenu(); RadMenuItem item = new RadMenuItem(); item.Text = "Add a root node"; menu.Items.Add(item); item.Click += item_Click; TreeViewContextMenuOpeningEventArgs args = new TreeViewContextMenuOpeningEventArgs(node, menu); OnContextMenuOpening(args); if (!args.Cancel) { menu.Show(this.ElementTree.Control, location); return true; } } return base.ProcessContextMenu(location); } private void item_Click(object sender, EventArgs e) { this.Nodes.Add(new RadTreeNode("New root")); } }
Add a possibility to set the auto-expand delay on drag-drop in RadTreeView.
Make the editing behavior in RadTreeView to be similar as the one present in windows explorer tree