[SOLVED] kendooQrCode export

Answered
0
0

I need to export or save the  kendoQRCode in a picture file; how can i do ?

  • You must to post comments
Best Answer
1
1

Hi Roni,

I started by using the sample file from this blog entry:

All about integration – Part 3

Then I looked up the Telerik Kendo UI API for that control:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/qrcode/methods/exportimage

Following this, I added an Export method in the InitScript:

qr4

this.Export = function() { var qrCode = $(this.container).data(“kendoQRCode”); qrCode.exportImage().done(function(data) { App.Window1.GetQRPicture (data); }); };

Then I defined a WebMethod and a helper method in Window1:

qr

And finally added a button that calls the Export function to test it:

qr2

Hope these steps help you get started.

qr3

Please also find the complete extended blog sample code attached.

Best regards
Frank

  • roni neri
    Very Good. Many thanks.
  • You must to post comments
0
0

Roni,

as an alternative you might also want to check out our free Barcode extension:

https://github.com/iceteagroup/wisej-extensions/tree/2.1/Wisej.Web.Ext.Barcode

It generates the Barcode image on the server thus saving a Client Server round trip.

Best regards
Frank

  • You must to post comments
0
0

I included the Integration3 project in my solution; now I have the problem with the picture generation

also with the App.Window1 version it  gives the same problem

 

 

  • Frank (ITG)
    You have to define GetQRPicture as a WebMethod. Can´t find that definition in your source code snippets. Best regards, Frank
  • You must to post comments
1
0

Hi Roni,

thinking some more about this, there is also a more elegant and flexible solution available:

Instead or hardcoding App.Window1 in the javascript, you can also pass a reference to your form:

qr5

Then change your function in InitScript to this:

qr6

Here you can benefit from the beauty and flexibility of Wisej 🙂

When you are using Call() Wisej can automatically convert a widget reference to a string id and then back to a widget on the client.

The same happens when sending an event with data from the client or calling a web method.
You can pass a widget reference back to the server and it automatically becomes a control.

Quite nice, isn´t it ?

Best regards
Frank

Attachment
  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.