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. Image for the cookie policy date

Barcode in SfSpreadsheet

How can I add a barcode in SfSpreadsheet?

5 Replies

TL Thirumurugan Loganathan Syncfusion Team September 26, 2016 01:44 PM UTC

Hi Berezkin, 
You can add the barcode in SfSpreadsheet by using cell customization support of the SfSpreadsheet. You need to derive the SpreadsheetVirtualizingCellRendererBase class of the Spreadsheet for achieve the cell customization. Please find the below UG reference link and sample link for more clarification. 

BG Berezkin Gena September 27, 2016 12:27 PM UTC

This example doesn't work. I get empty cell in spreadsheet.

KB Kanimozhi Bharathi Syncfusion Team September 28, 2016 11:35 AM UTC

Hi Berezkin,   
We were unable to reproduce the issue with our sample. The Barcode control loads fine in the cell of SfSpreadsheet in current version( Hence could you please update us your product version details and the sample which reproduces the issue to check further and provide an appropriate solution.   
Kanimozhi B   

BG Berezkin Gena October 26, 2016 11:00 AM UTC

How can I get a image using the SfBarcode?

GR Gayathri Ramalingam Syncfusion Team October 27, 2016 09:01 AM UTC

Hi Berezkin,  
Thank you for your update. 
We have already implemented the method called ToImage() and ToImage(Size) for SfBarcode. You can use this method to convert the barcode as image. 
Please find the below code snippet, 
QRBarcode barcode = new QRBarcode(); 
System.Windows.Media.Imaging.BitmapSource image = barcode.ToImage(); 

Please find the sample here, 
Please let us know if you need any further assistance.  
With Regards, 
Gayathri R 

Live Chat Icon For mobile
Up arrow icon