This is a migrated thread and some comments may be shown as answers.

RebindTreeView

3 Answers 95 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
John Thompson
Top achievements
Rank 2
John Thompson asked on 01 Aug 2011, 09:34 PM
I know that there is a RadTreeList client-side command for rebinding called RebindTreeList as well as the Rebind() server-side method.  It would be very nice to also have these features for for the RadTreeView.  And, while I am thinking about it, it would also be nice to have a NodeRemoved or NodeDeleted server-side event for the RadTreeView.

3 Answers, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 03 Aug 2011, 04:23 PM
Hello John,

 Thank you for these ideas.

We will definitely put a thought on them.

The first problem that emerges in implementing the rebind, though, is:
 - What should happen if you use the RadTreeView with Load On Demand and call rebind client-side?

The first problem that will be tricky about NodeRemoved event is:
 - Will people really enjoy getting NodeRemoved handlers fired during Drag&Drop (adding an existing node to a different parent node will trigger its removal from the source location, hence it will trigger NodeRemoved event)? Will it make enough sense?

Also, where exactly do you find the need of NodeRemoved event? Perhaps there are another means in which the problem you experience might be solved just as easily.

I am looking forward to your response.

Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
John Thompson
Top achievements
Rank 2
answered on 03 Aug 2011, 06:38 PM
I could use a NodeRemoved server side event for triggering a database action to remove an item from the hierarchy.  I have a context menu item that will "fake" that process now using a custom post back Ajax request with target.  It seemed to me to be a natural event.

Why would a NodeRemoved event have to fire during a drag and drop event? 
0
Accepted
Nikolay Tsenkov
Telerik team
answered on 08 Aug 2011, 01:22 PM
Hello John,

 "Why would a NodeRemoved event have to fire during a drag and drop event?"
 - It will be raised because in order to add a node to one collection, it's first removed from the previous in which it resides. Also the server events in ASP.NET WebForms are either triggered client-side or internally by our control. For example NodeExpand will not be raised server-side when you set node.Expanded = true; of a random node. In order to raise NodeRemove event we need to support such a action trough a user-action (e.g. default context menu with delete option for example). And RadTreeView doesn't support such.

This means that in the current state RadTreeView cannot implement NodeRemove event.

Still I haven't got the chance to discuss the Rebind functionality with the rest of the team, but I commit on doing so as soon as possible.

I only got the chance to think about it on my own and it's also unclear on some levels.

Rebind from client-side is adopted by all DataSource-only controls - meaning controls that cannot implement manual population. RadTreeView is not such a control - it allows for both of the approaches.

Once we decide on this, I will notify you in this same thread.

Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
John Thompson
Top achievements
Rank 2
Answers by
Nikolay Tsenkov
Telerik team
John Thompson
Top achievements
Rank 2
Share this question
or