)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to print the grid when barcode as one of the column?

Platform: jQuery |
Control: ejGrid |
Published Date: March 31, 2017 |
Last Revised Date: November 13, 2018
Tags: ejgrid, print, barcode

This knowledge base explains how to print the grid when Syncfusion canvas control such as barcode as one of the grid column using Print feature of Grid.

Solution:

Using beforePrint event, we can print the grid with column contains syncfusion canvas control (ejBarcode) as one of the column by converting the canvas element into image. Initially we can display the ejBarcode in Grid by using column template feature of grid.

Render the Grid control.

HTML

 

JS

 

MVC

 

 

ASP.NET

 

 

ASP.NET CORE

 

 

 

 

Angular

Define the template in the Index page.

 

 

HTML File

 

 

Ts File

 

Using template property of grid columns, we can add ejBarcode control as one of the grid column. Create an element using jsRender and convert the element to corresponding control by using templateRefresh and dataBound event of the grid.

 

In beforePrint event, convert the canvas element to image and then print the ejBarcode control.

 

 

Figure 1 Grid with barcode control

 

 

Figure 2 To print barcode control

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon