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

How to set custom message while deletion of file in File explorer Gridcontext menu

5 Answers 53 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
sandhya
Top achievements
Rank 1
sandhya asked on 02 Jun 2011, 11:52 AM
Hi,

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.
"
Are you sure you want to delete the selected item? It might still be in use. If deleted, some pages will not be displayed properly. Press "OK" to confirm deletion.

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

Thanks
Bhavani

5 Answers, 1 is accepted

Sort by
0
Accepted
Dobromir
Telerik team
answered on 03 Jun 2011, 01:38 PM
Hi Bhavani,

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:
Localization
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.

Greetings,
Dobromir
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
Ryan
Top achievements
Rank 1
answered on 04 May 2019, 02:04 AM

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?

0
Vessy
Telerik team
answered on 09 May 2019, 07:59 AM
Hi Ryan,

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:
protected void Page_Load(object sender, EventArgs e)
{
    RadFileExplorer1.Localization.SetString("Common_ConfirmDelete", "Are you sure you want to delete the selected item? Press \"OK\" to confirm deletion");
}


Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ryan
Top achievements
Rank 1
answered on 09 May 2019, 06:06 PM

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

0
Vessy
Telerik team
answered on 14 May 2019, 10:19 AM
Hi,

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. 

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
FileExplorer
Asked by
sandhya
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Ryan
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or