Page 1 of 1

Dynamically Change Barcode(Data Code)

PostPosted: 14 Jan 2016 11:48
by farhath
I need to know if it is possible to change the Barcode ->Data ->Code at run time. I tried this code:
IWCGJQBarCode2.DataCodaBar.Code:='12234';
The Error I am getting: Invalid Class Type Cast

IWCGJQBarCode2 is displaying correctly but I need to change its code at run time, any help?

Re: Dynamically Change Barcode(Data Code)

PostPosted: 14 Jan 2016 12:51
by Alexander Bulei
Hi,

What is your BarcodeType?

Best Regards.

Re: Dynamically Change Barcode(Data Code)

PostPosted: 14 Jan 2016 13:00
by farhath
jqbcCode128

Thanks..

Re: Dynamically Change Barcode(Data Code)

PostPosted: 14 Jan 2016 13:20
by Alexander Bulei
Hi,

So you need assign proper property/settigns:

delphi code
IWCGJQBarCode1.DataCode128.Code:= '1234';


And after the setting, you will need to use the AjaxReRender method:

delphi code
IWCGJQBarCode1.AjaxReRender(True,False);


Best Regards.

Re: Dynamically Change Barcode(Data Code)

PostPosted: 14 Jan 2016 14:02
by farhath
It works perfectly

Many Thanks...

Re: Dynamically Change Barcode(Data Code)

PostPosted: 19 Feb 2018 12:02
by assapan
Hi,
is there a way to download image of barcode ?

Re: Dynamically Change Barcode(Data Code)

PostPosted: 21 Feb 2018 10:06
by Alexander Bulei
Hi assapan,

is there a way to download image of barcode ?


Yes, you must use the IWCGJQHTML2Canvas component for that.

Example:

Code: Select all
IWCGJQHTML2Canvas1.ConvertAndSaveAsPNG(IWCGJQBarCode1, 'C:\tmp\test.png');


Best Regards.

Re: Dynamically Change Barcode(Data Code)

PostPosted: 21 Feb 2018 10:08
by assapan
Thank you