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

How to make the filename readonly

1 Answer 37 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 07 Jan 2014, 12:31 AM
After editing the existing image file, I would like to make the file name to be readonly so that the user cannot change the file name to another name when saving to the server.

How do I accomplish this?

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 07 Jan 2014, 12:07 PM
Hi Paul,

A way to make the file name in the Save dialog read only is to disable the corresponding text-box. This could be done in the handler of the ImageEditor's ClientDialogLoaded event in a similar way:
<telerik:RadImageEditor ID="RadImageEditor1" runat="server" ImageUrl="~/Images/relax.jpg"OnClientDialogLoaded="OnClientDialogLoaded">
</telerik:RadImageEditor>
<script type="text/javascript">
    function OnClientDialogLoaded(imageEditor, args) {
        var widget = args.get_widget();
        if (widget.get_name() == "Save") {
            widget.get_textBox().disabled = true;
        }
    }
</script>

I hope this information will be helpful for you to achieve the desired scenario.

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ImageEditor
Asked by
Paul
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or