cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help in binding Checbox select property to non Boolean values

Fehmina
Advisor
Advisor
0 Kudos

Hi All,

I am having a table in for one coloumn i am using checkbox. From backend I am getting values as "X" and " ".

Now my problem is how do I bind the selected Value of checkbox . Whenever i am deselecting it returns false .

However each time i am deseleccting its not returning " " just returns false value.

I tried <CheckBox selected="{= (${bNotRelevant} === 'X' ? 'X':' ')}" />

Accepted Solutions (0)

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

Convert from false to " " using a formatter function. Else, invoke a function where simply map false to " " and true to "X".

You can call this function in the event "select" of the checkbox. So, on select, call the function where if checked make it "X" and if unchecked make it " ". Save it to the variable or json model.

Regards,

Sharath