Problem of Editing a silverlight RadTreeViewItem

Guy

Hi,
I Have a problem with my application when I m trying to edit a radTreeViewItem. I use MVVM Pattern and I bind the radTreeViewItem's IsInEditMode with a boolean property of my business object. But sometimes the EditStart Event fires and a can Edit or sometimes the isinEditmode is set to true and EditStart event does not fire. In the latter case I lost the header and I can not edit.
I tried also not using the IsInEditMode property by using directly the BeginEdit() method on the RadTreeViewItem but also in that case sometimes i can edit sometimes not. I saw also in the wpf forum other people who have faced the same problem and i tried all suggested solutions without success.

Thank U for your help to overcome that problem

Petar Mladenov

Could you please send us a runnable sample showing the issue ? This way we could investigate it in depth and provide you with a better suited solution or advice? Meanwhile you can examine this demo or this documentation article and check if you have missed something. You can also test your application with the dlls from Q1 2011 Beta or some of the latest internal builds and see if the problem is still reproducible. Thank you for your cooperation.

All the best,
Petar Mladenov
the Telerik team

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

Guy

Hi,
Thanks u for your help. I solve partially the problem by setting directely the IsInEditMode property of RadTreeViewItem instead using binding. But the problem i faced is when I add a new item using a contextMenu of the radtreeView. I use the itemPrepared Event to set the IsInEditMode but the EditStarted event does not fire.
This the code I wrote for ItemPrepared Event:

But even when i use BeginEdit() method there is no EditStarted event fired.
Another problem i saw, during the editing it's not to insert the space. The demo example here http://demos.telerik.com/silverlight/#TreeView/NodeEditing does not accept the space character when editing. Is there a way to include the space character when editing?

Thanks for your help.

Petar Mladenov

Could you please elaborate more on your scenario, a sample project will be highly appreciated? It is very possible that the contextmenu steals the focus that the RadTreeViewItem needs in order to get into Edit Mode. On the other hand, the issue with the space key in edit mode is known and the fix for it will be included in the following internal build next week and SP1 13 scheduled for 13 April.

All the best,
Petar Mladenov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

I am also having this same problem, I have a context menu and when I try to bind to the IsInEditMode property and then try to edit a node the header disappears. So I tried the treeItem.BeginEdit() function in codebehind and it randomly works, when it stops working I cannot edit any nodes unless I reload the program.

I have created a project that shows this bug,

I will open a support ticket up for this:

Chad

Boardy

Same here. Treeview with context menu, but no binding at all. Though, when the PreviewExpanded event is fired, the child-nodes are retrieved from a service (asynchronously). Usually after expanding a couple of nodes, editing stops working. Observation/guess: It might start to go awry when the treeview is still in editing mode when the results of a request come in and new nodes are added.

Hristo

Currently we are aware of two cases in which the edit mode is not working correctly:
1. The first case is when tree view item is put into edit mode and before the edit mode is completed another item is also put in edit mode. This case is generally achieved through code and calling the BeginEdit method. Usually the BeginEdit is called on a click of button placed inside the TreeViewItem template. This bug is already fixed and should not be occurring with the upcoming 2011 Q2 SP release dlls.
2. The second issue is generally described as: "Edit mode does not starts when fast clicks are performed over tree items". Actually this issue is cause by the drag and drop manager and its functionality. We are still investigating the cause and will try fix it as soon as possible. However, a workaround by setting the IsDragDropEnabled property to true could be used for the time being we fix this.

Hope this post is helpful for understanding and correctly determining which of the two cases you are having troubles with.

Finally, if your scenario is different from the ones described above, I would be please if you share it with us and provide a test project.

Regards,
Hristo
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Farheen

I am currently using the telerik controls for silverlight version 2011.2.712.1040.
In this version, in RadTreeView i am facing the same issue as discussed in this post.
Sometimes the Edit started event does not fire when i try to rename an item. It is not very consistent and i am not able to find out why this happens.
Kindly provide a solution for this issue as we are not planning to migrate the telerik version.

Thanks
Farheen

Petar Mladenov

What logic do you need to perform on EditStarted ? Or the Item does not go into edit mode at all ?
If you bind the IsInEditMode to boolean property from our ViewModels, you can use the setter or the property instead of the event.
On a side note, we highly encourage you to upgrade because the version you use is almost 4 years ago and you may also hit other issues that are fixed in newer versions. Additionaly, you will be able to take advantage of all new features and new controls in our latest release compared to the release in 2011.

Regards,
Petar Mladenov
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.