Hello, does anybody have experience with printing gridview where one of the columns contains strings formatted with barcode font?
I have three columns in the grid and my goal is to print gridview where one column is formatted with barcode font and the rest of columns are formatted with different font. I am able to set the barcode font to all datacells. It seems that GridPrintStyle does not support such granular columns formatting.
private
void
btnPrintDispatchedContainers_Click(
object
sender, EventArgs e)
{
GridPrintStyle style =
new
GridPrintStyle();
style.FitWidthMode = PrintFitWidthMode.NoFit;
style.PrintGrouping =
true
;
style.PrintHeaderOnEachPage =
true
;
style.PrintHiddenColumns =
false
;
Font barcodeFont =
new
Font(
"Code 128"
, 20f, FontStyle.Regular);
Font groupRowFont =
new
Font(
"Segoe UI"
, 12f, FontStyle.Bold);
style.CellFont = barcodeFont;
style.GroupRowFont = groupRowFont;
rgvDispatchedContainers.PrintStyle = style;
rgvDispatchedContainers.Print();
}
Any thoughts will be appreciated.