|Visual Studio version
all browsers supported by RadControls
Sometimes, You use a button for delete function with confirmation from the user. And you usually write some js function, but this will repeat your work at many pages, or you simply don't like that way. And sometime, it's not quite easy and convenient to localize strings in js function. For example: with the confirmation "Are you sure to delete?", you would like to localize it in various languages.
I create a very simple button, which inherit RadButton, and a few lines of codes. You can set some properties in design-time to get the function you want to use.
I create two properties (of course, you can name whatever you like):
- CwIsConfirmButton: Default is "false", and the Button is just a normal RadButton. When set to "true", it becomes ConfirmButton, and you need to set the CwConfirmText as below.
- CwConfirmText: is just like its name. The string like: Are you sure to delete?... And you can localize this text as you like.
That's it. I think it's so simple but may be helpful.
I suggest this would be a function of RadButton in the next version.
Thank you for your awesome controls, Telerik.