Ui-table supports ui_control

Hi

Interesting task. First I took a look into the docs:

As I read it ... (I can't test it right now):

  1. define the table as selectable
  2. define one callback to send an array of selected rows back
msg.ui_control.tabulator={
    "selectable":true, 
    "columns":[ define your columns here ],
    "rowSelectionChanged":"function(data, rows){this.send({ui_control:{'callback':'rowSelectionChanged','rowSelection':data}});}"
}

This is the callback in a readable form:

var rowSelectionChanged = function(data, rows){
    this.send({ui_control:{'callback':'rowSelectionChanged','rowSelection':data}}); 
}

hope this helps

1 Like