In this particular case, the control is populated with 100 000. When all items are selected and we click on a single note all other items will be de-selected. This operation takes more time than expected. The de-selection process must be improved.
To reproduce:
1.Create new RadTreeView
2.Create new ImageList and populate
3.Assign ImageList to RadTreeView
4.Open Property Builder
5.Assign Image to a Node, Apply, Close
6.Re-Open, change Node to a different Image, the previous image remains
Expected: the new image is successfully updated.
Actual: the old image remains:
When the CheckBox of a RadTreeNode is checked programmatically, the Unknown Action parameter needs to be passed to the NodeCheckedChanging/ed event.
Use the following code snippet and compare the filtering performance when using bound and unbound mode:
public RadForm1()
{
InitializeComponent();
this.radTextBox1.TextChanged += this.RadTextBox1_TextChanged;
this.radTextBox2.TextChanged += this.RadTextBox2_TextChanged;
List<Data> list = new List<Data>();
this.radTreeView1.BeginUpdate();
for (int i = 0; i < 100000; i++)
{
list.Add(new Data()
{
Id = i,
Name = "MyData_"+i,
ParentId = -1
}) ;
this.radTreeView1.Nodes.Add("MyData_"+i);
}
this.radTreeView1.EndUpdate();
this.radTreeView2.DisplayMember = "Name";
this.radTreeView2.ParentMember = "ParentId";
this.radTreeView2.DataSource = list;
}
private void RadTextBox2_TextChanged(object sender, EventArgs e)
{
this.radTreeView2.Filter = this.radTextBox2.Text;
}
private void RadTextBox1_TextChanged(object sender, EventArgs e)
{
this.radTreeView1.Filter = this.radTextBox1.Text;
}
}
public class Data
{
public int Id { get; set; }
public string Name { get; set; }
public int ParentId { get; set; }
}
Expected behavior: the performance in bound and unbound mode should be quite similar
Actual behavior: the performance is much slower in bound mode
Repro-steps:
Observed behavior:
Expected behavior:
Repro-steps:
Observed behavior:
Expected behavior:
Steps to reproduce the issue:
1. Run the example app.
2. Click undo (the last item is removed).
3. Click redo (the last item should be added to the Treeview, it does not)
If I run the application and click undo twice and then redo twice, the things work. The Treeview is not updated if I add and remove the same element instance to the binding list.
Workaround: rebind the treeview after redo or create a new instance of the Element class with the same name and id.
Use the following code:
public RadForm1()
{
InitializeComponent();
// This XML contains a simple tree with a root node having 3 children, the first of which is intended to be Bold
var xml = "<TreeView xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" MultiSelect=\"true\" AllowDragDrop=\"true\" LabelEdit=\"true\" AllowDrop=\"true\"> <Nodes Text=\"New Package\" Expanded=\"true\" ImageKey=\"Package\" Font=\"Microsoft Sans Serif, 8.25pt, style=Bold\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\New Package</FullName><ObjectType>Package</ObjectType><IsRunnable>False</IsRunnable><IsContainer>true</IsContainer></Info></Tag> <Nodes Text=\"Query Engine\" ImageKey=\"QueryEngine\" Expanded=\"true\" Font=\"Microsoft Sans Serif, 8.25pt, style=Bold\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\Query Engine</FullName><ObjectType>QueryEngine</ObjectType><IsRunnable>true</IsRunnable><IsTableEntity>true</IsTableEntity><IsCut>false</IsCut></Info></Tag> </Nodes> <Nodes Text=\"Connector\" ImageKey=\"Irion.SQLServer\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\Connector</FullName><ObjectType>DBConnection</ObjectType><IsCut>false</IsCut></Info></Tag> </Nodes> <Nodes Text=\"Connector Link\" ImageKey=\"DatabaseDatalink\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\Connector Link</FullName><ObjectType>DatabaseDatalink</ObjectType><IsRunnable>true</IsRunnable><IsTableEntity>true</IsTableEntity><IsCut>false</IsCut></Info></Tag> </Nodes> </Nodes></TreeView>";
this.radTreeView1.LoadXML(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(xml)));
//make sure that the following 2 nodes are bold:
this.radTreeView1.Nodes[0].Nodes[0].Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
this.radTreeView1.Nodes[0].Nodes[2].Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
var tvx = this.radTreeView1.TreeViewXml;
}
The XML returned by the tvx variable is different in 6.0 and 4.7.2. The Font for the node is serialized in 4.7.2:
But the font is missing in 6.0:
If the list separator for the culture is ";"
and you have nodes in RadTreeView that are bold, the following XML will be serialized:
var xml = "<TreeView xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" MultiSelect=\"true\" AllowDragDrop=\"true\" LabelEdit=\"true\" AllowDrop=\"true\"> <Nodes Text=\"New Package\" Expanded=\"true\" ImageKey=\"Package\" Font=\"Microsoft Sans Serif; 8,25pt; style=Bold\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\New Package</FullName><ObjectType>Package</ObjectType><IsRunnable>False</IsRunnable><IsContainer>true</IsContainer></Info></Tag> <Nodes Text=\"Query Engine\" ImageKey=\"QueryEngine\" Expanded=\"true\" Font=\"Microsoft Sans Serif; 8,25pt; style=Bold\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\Query Engine</FullName><ObjectType>QueryEngine</ObjectType><IsRunnable>true</IsRunnable><IsTableEntity>true</IsTableEntity><IsCut>false</IsCut></Info></Tag> </Nodes> <Nodes Text=\"Connector\" ImageKey=\"Irion.SQLServer\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\Connector</FullName><ObjectType>DBConnection</ObjectType><IsCut>false</IsCut></Info></Tag> </Nodes> <Nodes Text=\"Connector Link\" ImageKey=\"DatabaseDatalink\"> <Tag xsi:type=\"xsd:string\"><Info><FullName>\\Connector Link</FullName><ObjectType>DatabaseDatalink</ObjectType><IsRunnable>true</IsRunnable><IsTableEntity>true</IsTableEntity><IsCut>false</IsCut></Info></Tag> </Nodes> </Nodes></TreeView>";
However, if you try to load this layout on another machine where the list separator is "," the nodes wouldn't be bold:
Expected:
Actual:
Note: the problematic part is how the font is stored actually: "Microsoft Sans Serif; 8.25pt; style=Bold"Please refer to the following code snippet:
Dim root As New RadTreeNode()
root.Expanded = True
root.Text = "Root"
root.Name = "Root"
Me.RadTreeView1.Nodes.Add(root)
Dim telerikTreeNode = New RadTreeNode With
{
.Expanded = True,
.Name = "Child1",
.Text = "Child1",
.Tag = "test",
.Font = New Font("Arial", 12.0F, FontStyle.Regular)
}
Me.RadTreeView1.Nodes("Root").Nodes.Add(telerikTreeNode)
For index = 2 To 5
Dim child As New RadTreeNode()
child.Text = "Child" & index
Me.RadTreeView1.Nodes("Root").Nodes.Add(child)
Next
Please use the attached sample project.
Result in 2021.1.326:
Result in 2021.2.511
1. Open Telerik Theme Viewer
2. Choose "Item Containers"
3. Observe "Tree"
4. Choose Theme "Office2019Dark"
Expected: Tree still shows content
Actual: Elements are not visible
1. Start WinAppDriver.exe
2. Open the attached sample solution
3. Click "Run all" tests
You will see that the test will not be able to locate any RadTreeNode elements located outside of the first parent node collection. Note that the test uses "FindElementByName("name")" method.
Please run the attached sample project and follow the steps in the attached gif file. You will notice that the nodes are displayed multiple times.
Workaround: it seems that if the BeginUpdate/EndUpdate methods are not used in the PerformNodeMove methods, the issue is not reproducible
I am using RadTreeView and setting FullRowSelect = false. This works for Windows7 them but doesn't work for Fluent theme.
Please refer to the attached sample project and try to edit a node. In random situations the Node argument in the Edited event is null or points to a wrong data node:
Steps to reproduce:
1. Set SortOrder to Ascending
2. Rename a root node
Code snippet for reproducing the problem:
Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.SongsTableAdapter.Fill(Me.MusicCollectionDataSet.Songs)
Me.ArtistsTableAdapter.Fill(Me.MusicCollectionDataSet.Artists)
Me.AlbumsTableAdapter.Fill(Me.MusicCollectionDataSet.Albums)
AddHandler Me.RadTreeView1.NodeDataBound, AddressOf RadTreeView1_NodeDataBound
Me.RadTreeView1.DataSource = Me.ArtistsBindingSource
Me.RadTreeView1.DisplayMember = "ArtistName"
Me.RadTreeView1.ValueMember = "ArtistID"
Me.RadTreeView1.RelationBindings.Add(New RelationBinding(Me.AlbumsBindingSource, "AlbumName", "ArtistID", "ArtistID", "AlbumID"))
Me.RadTreeView1.RelationBindings.Add(New RelationBinding(Me.SongsBindingSource, "SongName", "AlbumID", "AlbumID", "SongID"))
Me.RadTreeView1.CheckBoxes = True
Me.RadTreeView1.AutoCheckChildNodes = True
Me.RadTreeView1.TriStateMode = True
Me.RadTreeView1.ExpandAll()
End Sub
Private Sub RadTreeView1_NodeDataBound(sender As Object, e As RadTreeViewEventArgs)
If e.Node.Level = 0 Then
e.Node.CheckType = CheckType.None
Else
e.Node.CheckType = CheckType.CheckBox
End If
End Sub
Workaround: instead of using the NodeDataBound event, use the NodeFormatting event to hide the checkboxes for the desired nodes:
Private Sub RadTreeView1_NodeFormatting(sender As Object, e As TreeNodeFormattingEventArgs)
If e.Node.Level = 0 Then
e.NodeElement.ToggleElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
Else
e.NodeElement.ToggleElement.Visibility = Telerik.WinControls.ElementVisibility.Visible
End If
End Sub
Hi,
on the Winform Demo application, go to the TreeView demos, and selection "Selection".
1) select the "Folders" item listed under the "Inbox" item.
2) Collapse the "Inbox" item by clicking the ARROW next to the "Inbox"
3) Hold down the SHIFT key and left-mouse click on the "Outbox" item, you end up with a selection all the way up the tree to the ROOT element