Hide radio in datatable base on loaded data

Hi,

I am wondering if it is possible to exclude {common.radio()} from some lines in datatable, based on data values.

http://webix.com/snippet/be7c6f59

As you can see, I have value 1 for first row, and 0 for all others except last two where I would like to hide/erase/disable (whatever) radio.

Background: I have an universal datatable with first column reserved for checkboxes. Based on user selections, JSON data will change, and I will use clearAll,parse combination to recreate datatable. This part works but I have a problem with first column where sometimes I need to hide a radio based on JSON data.

You can always convert column’s template to javascript function and place the custom logic inside

{id:"A",header:"",template:function(obj, common){
            if (obj.A === "HIDE ME") return "";
            return common.radio.apply(common, arguments);  
          }

http://webix.com/snippet/f40cef28

Well thank you. I never realized that template can be function return. :slight_smile: That is actually very smart.