We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Jump to new TreeViewItemAdv

Hi there,

I have a small problem with my TreeViewAdv. I create a new TreeViewItemAdv at the end (bottom) of my TreeView an want to bring the new Item into view using this code:

TreeViewItem vbgItem = new TreeViewItem()
{
Header = tagString.Substring(tagString.LastIndexOf(@"\") + 1).ToLower(),
Tag = "new Tag,
CollapsedImageSource = new BitmapImage(new Uri("/images/png/Folder_close_16x16-32.png", UriKind.Relative)),
ExpandedImageSource = new BitmapImage(new Uri("/images/png/folder_open_16x16-32.png", UriKind.Relative))
};
item.Items.Add(vbgItem);
vbgItem.IsSelected = true;
treeViewAdv1.BringIntoView(vbgItem);

"item" is my root-item


The item will be created successful and the scrollbar scrolls down, but it looks like that the new Item will be painted after the scrollBar has scrolled to the bottom, because the new item does not come into view and the scrollbar grows. After all I can scroll down to the new Item.

I don't know that I do wrong.
Have you any sugestions for me?

Greetings
Andreas


1 Reply

SN Surya Narayanan G Syncfusion Team July 28, 2011 02:30 PM UTC

Hi Andreas,

Thanks for using Syncfusion products.

we are unable to reproduce the painted issue when scrolling the TreeViewAdv and have created a sample to illustrate bringing last item in to view and you can download the sample under the following location.

Please let me know in case of any queries

Regards
SuryaNarayanan



F100235_TreeViewItem_Jump_89163ea6.zip

Loader.
Live Chat Icon For mobile
Up arrow icon