Is there any posibility to change the message while deletion of file from file explorer gridcontext menu,
At present while deletion of record the following message is coming.
Now i want to set my custom my message.
Is it posible?if it s yes how to impliment tat?please provide me any demo application or any ideas
5 Answers, 1 is accepted
Most of the messages of RadFileExplorer are localized and you can modify them using resource files. More detailed information regarding RadFileExplorer's localization is available in the following help articles:
Using Global Resource Files
The message displayed in the Delete confirmation dialog is located in the RadEditor.Dialogs.resx with key Common_ConfirmDelete.
I hope this helps.
the Telerik team
I'm quite surprised (and frustrated) that the standard message includes text telling the user that if the file is deleted some web pages will not be displayed properly. That is very specific wording and is not appropriate for a general-use control (like this one). How do you even know that the file is used by a web page?
The message should be simplified to just "Are you sure you want to delete the selected item? Press "OK" to confirm deletion"
Oddly, it seems like sometimes the message is simple (like the one I provided) and sometimes it's the longer (inappropriate) one. I don't understand why?
Also, what happens if you go to the effort of copying the resx files, editing the text (as you suggest), then, in a future update of this Telerik control, there are new resource strings needed by the control, but not in the copy of the resx file that was from an old version of the control? Does the control break? Do you have to make another copy of Telerik's resx file and redo the changes?
The default content provider of RadFileExplorer works with physical files from the file system, and uses System.IO.File for this purpose. The file that the user is trying to delete may be used by other web page/user, by the file system, by other process, this is why we have decided to show a more descriptive message in the confirmation dialog.
As per the location files of the control - yes, you need to update them with each DLLs update in order to keep them up to date, having the localization for all newly added features in them. As a possible alternative, you can change the localization only for the desired string directly in the code-behind of the application:
Thanks for the code example! That seems much simpler (for changing one message) than editing (and re-editing) the resx file. I still feel that your default message is not appropriate, because it assumes things that may not be true.
By comparison, I would have the same complaint, if your message, when deleting a row from a RadGrid, said something like this:
"Are you sure you want to delete the selected row? It might be in use. If deleted, some parts of this application will not work properly. Press "OK" to confirm deletion."
Fortunately that's not the case with the RadGrid. But it is the case with the FileExplorer. As a developer, I can use the FileExplorer to show BLOBs in the database, or files that are never used by web pages. So it doesn't seem right that your standard message tells users that if they delete an item, some pages will not be displayed properly
Thanks a lot for the shared feedback, Ryan. I will pass your concerns to our developers, but still we will need a pretty high demand for changing the default behavior of the control, as it will introduce a big change to the developers that have chosen to use the built-in way.