OnImageEditing Not Firing

3 posts, 0 answers
  1. Nelbin
    Nelbin avatar
    15 posts
    Member since:
    Jul 2013

    Posted 14 Aug 2013 Link to this post

    I have put this in my ascx file and I already have a ImageEditorTool with
    the command name CustomPrint. But it seems that it isn't firing in the codebehind.
     I tried it using breakpoint and still it isn't firing. Any help?

    The other tools(not custom) are working. I am also making this under vb.net coding
          <telerik:RadImageEditor ID="CurrentPageImage" runat="server" Height="100%" Width="100%" OnImageEditing="CurrentPageImage_ImageEditing">
            
                        <Tools>
                        
                         <telerik:ImageEditorToolGroup>
                          <telerik:ImageEditorTool CommandName="Rotate" ToolTip="Rotate Image" IsToggleButton="true">
                         </telerik:ImageEditorTool>
                           
                        <telerik:ImageEditorTool CommandName="RotateRight" ToolTip="Rotate Right by 90 degrees">
                     </telerik:ImageEditorTool>
                        <telerik:ImageEditorTool CommandName="RotateLeft" ToolTip="Rotate Left by 90 degrees">
                        </telerik:ImageEditorTool>
                        <telerik:ImageEditorTool CommandName="Flip" ToolTip="Flip Image" IsToggleButton="true">
                    </telerik:ImageEditorTool>
     
                    <telerik:ImageEditorTool CommandName="FlipVertical" ToolTip="Flip Image Vertically">
                    </telerik:ImageEditorTool>
                    <telerik:ImageEditorTool CommandName="FlipHorizontal" ToolTip="Flip Image Horizontally">
                    </telerik:ImageEditorTool>
                       <telerik:ImageEditorTool CommandName="Zoom" ToolTip="Zoom Image" IsToggleButton="true">
                    </telerik:ImageEditorTool>
            <telerik:ImageEditorTool CommandName="ZoomIn" ToolTip="Zoom In">
                    </telerik:ImageEditorTool>
                          <telerik:ImageEditorTool CommandName="ZoomOut" ToolTip="Zoom Out">
                    </telerik:ImageEditorTool>
                      <telerik:ImageEditorTool CommandName="CustomPrint" ToolTip="Print" ImageUrl="~/Images/PDFViewer/pdf-view-12-print.png" >
                    </telerik:ImageEditorTool>
            </telerik:ImageEditorToolGroup>
        </Tools>
                            </telerik:RadImageEditor>
    <
    script type="text/javascript">
                                  Telerik.Web.UI.ImageEditor.CommandList.CustomPrint = function (imageEditor, commandName, args) {
     
                                      var commandText = "CustomPrint";
                                      var commandArgument = "Additional Argument Sent to the Server";
                                      
                                      imageEditor.editImageOnServer(commandName, commandText, commandArgument, callbackFunction)
                                   
                                  }
     
                                  function callbackFunction(clientData, serveData) {
                                  }
        </script>
  2. Nelbin
    Nelbin avatar
    15 posts
    Member since:
    Jul 2013

    Posted 14 Aug 2013 Link to this post

    I think I have solved my problem but any second opinions? I just set the canvas mode to no. I am not sure if there are going to be downside effects on my solution. Thanks
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 19 Aug 2013 Link to this post

    Hello Nelbin,

    As you have assumed, setting the CanvasMode="No" is the solution of the issue. The reason for that is that when the ImageEditor is used in enabled CanvasMode all changes are made on the Client, and so the ImageEditing event is not fired.

    The only downside effects that you will meet is that your users will not be able to use all of the CanvasSupported features of the control (like filtering and drawing), but currently this is the only way to implement a custom Server command.

    Kind 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.
Back to Top