I can successfully delete rows from my TreeList but I need to show the user a popup confirmation box first. I have searched extensively for a solution and cannot find anything.
My code for removing a row is listed below:
I guess I need some kind of java script popup.
12 Answers, 1 is accepted
I suggest that you use the following template column in order to implement delete with confirmation:
I hope this helps.
the Telerik team
Like... If I use RADCONFIRM in a 100 of my RadGrids as a standard for my DELETE/CONFIRM process, it looks pretty weird to have this ONE box NOT be a RADCONFIRM because I'm using RadTreeList.
Using the following slightly altered code (to be "radconfirm" from "confirm") does NOT block the execution of the delete (i.e. the DELETE occurs regardless of what you choose...in fact, the DELETE occurs long before the choice is even able to be made.)
Why don't we have the exact same functionality for a "TreeListButtonColumn" as we do for a "GridButtonColumn" in RadGrid (shown below)?? It would appear this sort of thing would/should have the exact same functionality. In fact, I can't believe they both aren't built from the same base class with the same base functionality. Yet, no "confirm" functionality exists on the TreeList side. Why?
So, given it doesn't have the same functionality as a GridButtonColumn, how would one go about using "RadConfirm" in this situation (using my TreeListTemplateColumn as a start...) ??
I came across this post/code:
This is exactly what I was looking for.
However, I would STRONGLY suggest this kind of functionality be wrapped up into "TreeListButtonColumn" just like GridButtonColumn has today.... This is just way too much code that needs to be added for a simple confirmation in TreeList and is SOOOO easy to do with GridButtonColumn in a RadGrid. Please put this on the list to incorporate for the next version of TreeList.
I have forwarded your request to our developers and they will implement it in the future versions of the RadTreeList.
Thank you for the suggestion.
All the best,
the Telerik team
just to know is it been implemented in latest revision?
This is not yet available as a built-in feature, as it has been a low priority task. I will note to our developement team that it has been requested again, so they can probably increase its priority and implement it soon.
the Telerik team
The confirmation feature has been implemented and is available out of the box for the TreeListButtonColumn. You can set the text in the confirmation dialog via the ConfirmText property.
If you would like additional information on how the confirmation dialog can be configured you would find the following article interesting.
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.
Is this also available for mvc?
RadTreeList and the other controls from the UI for ASP.NET AJAX suite are designed for WebForms and are not supported under MVC.
The Kendo TreeList widget that also has an MVC helper does not offer a built-in confirmation dialog, yet you can define a custom command where you can invoke the desired confirmation logic before doing anything with the treelist: