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
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:
I am using RadTreeView and setting FullRowSelect = false. This works for Windows7 them but doesn't work for Fluent theme.
Steps to reproduce:
1. Set SortOrder to Ascending
2. Rename a root node
If you have a node with a very long text that requires horizontal scrollbar and at the same time you have a many nodes which requires a vertical scrollbar in some border cases the long text of the node is cut off (with ellipsis).
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
How to reproduce:
DataTable table = new DataTable();
table.Columns.Add("ParentId", typeof(int));
table.Columns.Add("ChildId", typeof(int));
table.Columns.Add("ProductId", typeof(int));
table.Columns.Add("ProductCode", typeof(string));
table.Rows.Add(0, 1, 3, "Pr - 01");
table.Rows.Add(1, 2, 4, "P r- 02");
table.Rows.Add(1, 3, 5, "Pr - 03");
this.radTreeView1.DisplayMember = "ProductCode";
this.radTreeView1.ParentMember = "ParentId";
this.radTreeView1.ChildMember = "ChildId";
this.radTreeView1.ValueMember = "ProductId";
this.radTreeView1.DataSource = table;
Add a RadTreeView and fill it with nodes so that a vertical scrollbar is shown.
The RadTreeView.TopNode property indicates that it is expected to return the RadTreeNode which visual node element is the first visible one in the current view. But it always return the first data node in RadTreeView no matter which node is currently visible at the top. This is because it consider the RadTreeNode.Visible property.
Workaround:
TreeNodeElement neFirstVisible = this.radTreeView1.TreeViewElement.ViewElement.Children[0] as TreeNodeElement;
RadMessageBox.Show("TopNode = " + neFirstVisible.Data.Text);
Greetings,
While testing the exporting feature of RadTreeView, I noticed the following issue :
Using the code below , everything works just fine :
Me
.RadTreeView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes
Dim
exporter
As
TreeViewSpreadExport =
New
TreeViewSpreadExport(
Me
.RadTreeView1)
AddHandler
exporter.CellFormatting,
AddressOf
exporter_CellFormatting
exporter.ExportFormat = SpreadExportFormat.Xlsx
exporter.ExportVisualSettings =
False
exporter.ExportImages =
False
exporter.ExportChildNodesGrouped =
True
exporter.CollapsedNodeOption = HiddenOption.ExportAlways
Dim
renderer
As
SpreadExportRenderer =
New
SpreadExportRenderer()
exporter.RunExport(
"D:\test.xlsx"
, renderer)
But, the following line of the code raises an error in a specific circumasntance (I describe it more, further in the thread) :
exporter.RunExport(
"D:\test.xlsx"
, renderer)
Error Screenshot is attached : 1.jpg
Details about the error :
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=value should be greater or equal than 0 and less or equal than 7.
Parameter name: value
Source=Telerik.Windows.Documents.Spreadsheet
StackTrace:
at Telerik.WinControls.UI.RadButtonBase.buttonElement_Click(
Object
sender, EventArgs e)
at Telerik.WinControls.RadElement.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonElement.OnClick(EventArgs e)
at Telerik.WinControls.RadElement.DoClick(EventArgs e)
at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(
String
[] commandLine)
The Specific Circumstance :
In my RadTreeView's NodeMouseClick , I add some child nodes to the node which is clicked, at runtime :
Dim
_Node1
As
RadTreeNode = e.Node.Nodes.Add(
"Node 1"
)
Dim
_Node2
As
RadTreeNode = e.Node.Nodes.Add(
"Node 2"
)
Dim
_Node3
As
RadTreeNode = e.Node.Nodes.Add(
"Node 3"
)
Then I found out that setting "exporter.ExportChildNodesGrouped" to True causes the error. But if it is set to false, no error raised even in the above Circumstance.
P.S Normally setting "exporter.ExportChildNodesGrouped" to True or False doesn't cause any error, but adding some child nodes at run time surly does.
Thanks for your attention.
Add a CodedUI test which records expanding a node in RadTreeView. Run the CodedUI test and you will see that the TestMethod throws the following exception:
"Microsoft.VisualStudio.TestTools.Extension.UITestControlNotFoundException: The playback failed to find the control with given search properties."
Please refer to the attached sample project. Run the application on a WIndows 10 machine. Switch on the Narrator and try to expand a node then the EnableRadAccessibilityObjects property is set to true. Workaround: set the EnableRadAccessibilityObjects property to false.
Sub New()
InitializeComponent()
Me.RadTreeView1.Nodes.Clear()
Me.RadTreeView1.CheckBoxes = True
Dim node = New RadTreeNode("1") With {.CheckType = CheckType.CheckBox, .Checked = True, .CheckState = ToggleState.Indeterminate}
RadTreeView1.Nodes.Add(node)
node.Nodes.Add(New RadTreeNode("1.1") With {.CheckType = CheckType.RadioButton, .Checked = True, .CheckState = ToggleState.Indeterminate})
node.Nodes.Add(New RadTreeNode("1.2") With {.CheckType = CheckType.RadioButton})
node.Nodes.Add(New RadTreeNode("1.3") With {.CheckType = CheckType.RadioButton})
node = New RadTreeNode("2") With {.CheckType = CheckType.CheckBox, .Checked = True, .CheckState = ToggleState.Indeterminate}
RadTreeView1.Nodes.Add(node)
RadTreeView1.Nodes.Add(New RadTreeNode("3"))
End Sub
Workaround:
Sub New()End Sub
I've got a tree with multiple nodes like
document1
-page 1
-page 2
document1
-page 1
-page 2
-page 3
...
document10
-page 1
-page 2
Due to the size of the treeview, only 2 or 3 documents are on screen, the rest is scrolled. (manually added items, no dynamic or lazy loading)
Lets say I click page 2 of document one, hold the mouse button to select more and go down to the last document (the tree is automatically scrolled down, as expected)
But when I go back to review what I selected, only the last items on screen are selected (documents 9 and 10 for example).
When I try to do the same selection with the arrow keys and the shift key, it works fine, but not with the mouse.
Hello,
I use radbreadcrumb as a group path explorer in my software.
I associate it with a treeview. Please see the attache photos.
When I select a treeviewitem which has too much parent levels, the radbreadcrumb can not display the path completely.
I've tried autoscrollmargin and autoscrollminsize. No luck. Because my radbreadcrumb is in a splitcontainerpanel, the display size is changeable.
I expect a custom function can act like Windows Explorer (see the last attach photo). When there is no enough display space, only the last levels are shown.
PS. I've integrated the telerik solution from this post. And it works great.
https://www.telerik.com/forums/getting-breadcrumb-to-act-like-windows-explorer-breadcrumb
Thank you by advance.
Kun
Hi all,
RadTreeView is very nice control , For treeline we can give line style, color but we can't set line thickness,
I want to change thickness of Treeline can you guide me how to do it?