This is a migrated thread and some comments may be shown as answers.

Checkbox not getting checked

1 Answer 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gopinath
Top achievements
Rank 2
Gopinath asked on 23 Mar 2015, 08:36 AM
Hi,

I am using        
 this.chkComplianceStatus.Text = "{Fields.COMPLIANCE_STATUS_CODE} - {Fields.COMPLIANCE_STATUS_DESC}";     
this.chkComplianceStatus.Value = "= IIf(Fields.RANK_NUM = Parameters.al_rank_num.Value,True,False)";
for the checkbox to be checked.But the checkbox is not getting checked, the above expression is always returning false

FalseValue = "= False";
TrueValue = "= True";
Fields.RANK_NUM is of type Number
Parameters.al_rank_num is of type integer

I also tried this.chkComplianceStatus.Value = "= IIf(Fields.RANK_NUM.ToString() = Parameters.al_rank_num.Value.ToString(),True,False" +
    ")"; to make sure bothe types are same so that it will return true, still this is returning false. Can i convert integer type to string this way in the expression itself?

I don't know where i am going wrong.Please let me know

Thanks in advance
Gopinath




1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 25 Mar 2015, 10:48 PM
Hello Gopinath,

You can show the Fields.RANK_NUM and Parameters.al_rank_num.Value inside a text box somewhere in the report in order to check if they are returning equal values.
In case the difference is only in the data type of the values you can convert the values to the same type inside an expression using the built-in Conversion Functions.

Regards,
Nasko
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
General Discussions
Asked by
Gopinath
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Share this question
or