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
|
This page will automatically be redirected to the sign-in page in 10 seconds.