How to change the format of a Grid Boolean column

Posted by Carlos Calpe on 25-May-2018 05:32

Hi!

I'm trying to change the format of a Boolean column showed in a grid. I want to show the format "Si/No" for "True/False" so it show similar to the filter labels. I've tried with the field template but I haven't been able.

Any idea?

Posted by Anil Kumar on 25-May-2018 14:46
Hi Carlos,
 
I tried this by adding a template for the grid columns and was able to achieve the same. Please find below details:
 
I have a grid and by default following is how a boolean field is represented in the grid columns.
 
 
Now add a template for the grid column in the KUIB environment as below:
  • Navigate to KUIB designer
  • In the view, in the properties section click on Edit button next to ‘Grid Columns’
  • Select specific field under ‘Included Columns’ section and
  • Click on Edit button next to Template option
  • Add following code snippet
                                # if (<field_Name> == true) { # Si #} else { # No # } #
  • Save the app and click on Generate/Preview and observe that the generated web app is shown as below
 
 
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar
 

All Replies

Posted by Anil Kumar on 25-May-2018 14:46
Hi Carlos,
 
I tried this by adding a template for the grid columns and was able to achieve the same. Please find below details:
 
I have a grid and by default following is how a boolean field is represented in the grid columns.
 
 
Now add a template for the grid column in the KUIB environment as below:
  • Navigate to KUIB designer
  • In the view, in the properties section click on Edit button next to ‘Grid Columns’
  • Select specific field under ‘Included Columns’ section and
  • Click on Edit button next to Template option
  • Add following code snippet
                                # if (<field_Name> == true) { # Si #} else { # No # } #
  • Save the app and click on Generate/Preview and observe that the generated web app is shown as below
 
 
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar
 
Posted by Carlos Calpe on 28-May-2018 04:16

Hi Anil,

Thank you very much for your help!! It's worked perfectly!

Kind Regards

Carlos Calpe

This thread is closed