To reproduce: - add a RadTreeView - enable multiselect - select at least 1 node - call radTreeView1.SelectedNodes.Clear() Workaround: Clear the nodes manually: foreach (var node in this.radTreeView1.SelectedNodes.ToList()) { node.Selected = false; }
How to reproduce: check the attached project
Workaround: create a custom TreeViewDragDropService
class CustomTreeViewElement : RadTreeViewElement
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadTreeViewElement);
}
}
protected override TreeViewDragDropService CreateDragDropService()
{
return new CustomDragDropService(this);
}
}
class CustomTreeView : RadTreeView
{
protected override RadTreeViewElement CreateTreeViewElement()
{
return new CustomTreeViewElement();
}
public override string ThemeClassName
{
get
{
return typeof(RadTreeView).FullName;
}
}
}
class CustomDragDropService : TreeViewDragDropService
{
public CustomDragDropService(RadTreeViewElement owner)
: base(owner)
{ }
protected override bool CancelPreviewDragDrop(RadDropEventArgs e)
{
return false;
}
}
To reproduce:
public RadForm1()
{
InitializeComponent();
for (int i = 0; i < 10; i++)
{
this.radTreeView1.Nodes.Add("Node1." + i);
}
this.radTreeView1.AllowDragDrop = true;
this.radTreeView1.TreeViewElement.DragDropService.PreviewDragDrop+=DragDropService_PreviewDragDrop;
}
private void DragDropService_PreviewDragDrop(object sender, RadDropEventArgs e)
{
e.Handled = true;
}
To reproduce:
for (int i = 0; i < 10; i++)
{
this.radTreeView1.Nodes.Add("Node1." + i);
}
this.radTreeView1.AllowDragDrop = true;
this.radTreeView1.TreeViewElement.DragDropService.ShowDragHint = false;
Workaround: this.radTreeView1.TreeViewElement.DragDropService.PreviewDragHint += DragDropService_PreviewDragHint;
private void DragDropService_PreviewDragHint(object sender, PreviewDragHintEventArgs e)
{
e.UseDefaultHint = false;
}
To reproduce: please refer to the attached gif file.
Workaround: insteda of hiding the expander by the ShowExpandCollapse property use the NodeFormatting event as follows:
private void radTreeView1_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
e.NodeElement.ExpanderElement.Visibility = ElementVisibility.Collapsed;
}
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
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.
Private Sub LoadTvObjectInApp()
Dim objectInApps As IQueryable(Of ObjectInApp)
objectInApps = _context.ObjectInApps.Where(Function(c) (c.ApplicatieCode = "zis") AndAlso Not (c.GroepNaam = "hulp" AndAlso c.IsSysteemObject = True))
Sort the selected nodes according to their position in the tree
RadTreeView. Add node templates as ASP.NET AJAX - http://www.telerik.com/help/aspnet-ajax/treeview-templates-structure.html
I need to drop a simple plain text from a textbox into a Rad Treeview. I just read the forum, I'm mixing OLE Drag & Drop and RadTreeView Drag & Drop. The Events seems to be right and they seems to work fine. But I'm just having a problem with the Visual Indicators of the treeview: When I drag a regular node inside the treeview, I can see that visual indicators (the target node is highlighted, I can see a line of dots showing the direction above or below the target node, or the "forbidden" cursor, etc). And when I actually try to drag a simple text inside the treeview, I don't see any of those stuff. I need the same visual behavior when dropping a simple text. I need to see the indicators and I don't know how to activate them.
Pressing arrow down or up when renaming item on a list with scrollbar throws null pointer exception. Example solution in attachement. Steps to reproduce with attached solution: Scroll down to last element (A99) Press F2 (rename) and rename to "0" Press arrow up or down on a keyboard (without pressing enter after rename). -> NullReferenceException is thrown.
Please refer to the attached screenshot from the Demo application >> General Settings example.
Workaround:
private void radTreeView1_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
e.NodeElement.ExpanderElement.Margin = new Padding(2, 0, 0, 0);
}
To reproduce:
this.radTreeView1.TriStateMode = true;
RadTreeNode sitesNode = radTreeView1.Nodes.Add("Sites", "Sites", "");
sitesNode.Expanded = true;
RadTreeNode siteNode = new RadTreeNode("A site");
sitesNode.Nodes.Add(siteNode);
RadTreeNode eNode = new RadTreeNode("Event Types");
siteNode.Nodes.Add(eNode);
siteNode.Expanded = true;
RadTreeNode dummy = new RadTreeNode("dummy");
eNode.Nodes.Add(dummy);
dummy.CheckState = ToggleState.On;
RadTreeNode dummy2 = new RadTreeNode("dummy2");
eNode.Nodes.Add(dummy2);
dummy2.CheckState = ToggleState.Off;
Please refer to the attached screenshot.
Workaround: change the CheckState property after all nodes are added to RadTreeView.
this.radTreeView1.TriStateMode = true;
RadTreeNode sitesNode = radTreeView1.Nodes.Add("Sites", "Sites", "");
sitesNode.Expanded = true;
RadTreeNode siteNode = new RadTreeNode("A site");
sitesNode.Nodes.Add(siteNode);
RadTreeNode eNode = new RadTreeNode("Event Types");
siteNode.Nodes.Add(eNode);
siteNode.Expanded = true;
RadTreeNode dummy = new RadTreeNode("dummy");
eNode.Nodes.Add(dummy);
RadTreeNode dummy2 = new RadTreeNode("dummy2");
eNode.Nodes.Add(dummy2);
dummy2.CheckState = ToggleState.Off;
dummy.CheckState = ToggleState.On;
Please refer to the attached gif file and sample project. The screen tip position is not the same each time. Hence, the issue may not be reproducible every time. Workaround: use the TooltiptextNeeded event.
Please refer to the attached gif files illustrating the working and non working design time data binding.
To reproduce:
Add a RadTreeView and a RadBreadCrumb and two RadButtons on the form and populate the tree view with data. Use the following code snippet:
private void radButton1_Click(object sender, EventArgs e)
{
this.radBreadCrumb1.DefaultTreeView = null;
}
Random rand = new Random();
private void radButton2_Click(object sender, EventArgs e)
{
this.radTreeView1.DataSource = null;
DataTable dt = new DataTable();
dt.Columns.Add("Id");
dt.Columns.Add("Name");
for (int i = 0; i < 10; i++)
{
dt.Rows.Add(rand.Next(0, 20), "Node" + i);
}
this.radTreeView1.DataSource = dt;
this.radTreeView1.DisplayMember = "Name";
this.radTreeView1.ValueMember = "Id";
this.radBreadCrumb1.DefaultTreeView = this.radTreeView1;
}
Select some node in RadTreeView, the RadBreadCrum is updated respectively. Then click the first button to detach RadTreeView from RadBreadCrumb. Click the second button to populate RadTreeView with new data and associated the RadBreadCrumb with RadTreeView again. As a result you will notice that the last selected node will be loaded.
Workaround: clear the selection in RadTreeView before associating the RadBreadCrumb with RadTreeView:
this.radTreeView1.ClearSelection();
this.radBreadCrumb1.DefaultTreeView = this.radTreeView1;
To reproduce: 1. Add a RadTreeView and a RadBreadCrumb. Associated the breadcrumb with the tree. 2. Select a node and use the following code: this.radBreadCrumb1.DefaultTreeView.Nodes.Clear(); Workaround: set the RadBreadCrumb.DefaultTreeView property to null.