Page 1 of 1

how to programming checkbox checked

Posted: Sat Aug 12, 2023 8:27 am
by nickysuwandi
Dear All

I had try to set checked value in checked box

I had put condition in checked property

Code: Select all

{IIF(DtAkJIden.warga="WNA",true,false)}
but i got error

The error of compilation
The error of compilation is found in the 'Checked' property of the 'ChkBoxWarga1' component:
Property or indexer 'Reports.Report.DtAkJIdenDataSource.warga' cannot be assigned to -- it is read only

The error of compilation
The error of compilation is found in the 'Checked' property of the 'ChkBoxWarga1' component:
The best overloaded method match for 'Stimulsoft.Report.StiReport.IIF(bool, object, object)' has some invalid arguments

The error of compilation
The error of compilation is found in the 'Checked' property of the 'ChkBoxWarga1' component:
Argument 1: cannot convert from 'string' to 'bool'

Re: how to programming checkbox checked

Posted: Sun Aug 13, 2023 8:46 pm
by Lech Kulikowski
Hello,

Please check the CSharp syntactic, which should be:
{IIF(DtAkJIden.warga=="WNA",true,false)}

Thank you.

Re: how to programming checkbox checked

Posted: Mon Aug 14, 2023 2:03 am
by nickysuwandi
Thanks Lech

It work perfectly

Re: how to programming checkbox checked

Posted: Mon Aug 14, 2023 7:42 am
by Lech Kulikowski
Hello,

You are welcome.