No save on server, aspect ration and more

3 posts, 0 answers
  1. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 16 Sep 2011 Link to this post

    First of all - Congratulations

    Having the option to set an aspect ratio is a super cool feature. Unfortunately I did not find where I can set my own ratios like 16:9 or 4:3 for example.

    It would also be nice if I could reset the first image

    Any ideas

  2. Rumen
    Rumen avatar
    13243 posts

    Posted 19 Sep 2011 Link to this post

    Hello Markus,

    The code below shows how to add a new item to the aspect ratio dropdowns of the Crop and Resize dialogs of RadImageEditor. You can use it as a base to implement your scenario:

      <telerik:RadImageEditor ID="RadImageEditor1" runat="server" OnClientCommandExecuting="modifyCommand" ImageUrl="~/Images/Vucko.jpg">
                   <telerik:ImageEditorTool CommandName="Reset" ToolTip="Reset Image" />
                  <telerik:ImageEditorToolSeparator />
                  <telerik:ImageEditorTool CommandName="Resize" ToolTip="Resize" />
                  <telerik:ImageEditorTool CommandName="Crop" ToolTip="Crop" />
    <script type="text/javascript">
        function modifyCommand(imageEditor, args) {
            var commandName = args.get_commandName();
            if (commandName) {
                waitForCommand(imageEditor, commandName, function (widget) {
                    if (commandName == "Crop") {
                        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                    else if (commandName == "Resize") {
                        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
        function waitForCommand(imageEditor, commandName, callback) {
            var timer = setInterval(function () {
                var widget = imageEditor.get_currentToolWidget();
                if (widget && widget.get_name() == commandName) {
            }, 100);

    Kind regards,
    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
  3. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 19 Sep 2011 Link to this post

    Dear Rumen

    It does work on the Crop not on the Resize?

    Crop uses _presetDD
    Resize uses _coboSizes

    Is this correct.

    Wouldn't it make sense to inculde this in the help file as soon as possible.

    Of course it would be nice if this could be set via a tools.xml file more easely then to use JS.

    Thanks again.

    Great tool. Missed such a funtionality for a very long time and finaly am able to provide this to my customers.

Back to Top