Download ui-table command

ui-table seems like an incredibly powerful way to interact with data. I've got it reading from my various databases, and want to be able to modify cells in the table, then send a command to download the table to a csv file.
I looked at example 6, and figure for downloading I could add a button to send the download command.
But what does the code look like? I tried some of the attempts others tried - doesn't seem to work.
Also how do I set the cells so they are interactive and can be modified from the ui?

Take a look here Ui-table supports ui_control - #60 by Christian-Me

After trying to sort through the many comments, I tried two things -

  1. copied the example code for setting up the table to be editable, then connecting the output to the input of my table (which is two items per entry, text name and text value, labeled as fun and val)
    Here is that code:
    "tabulator": {
    "columns": [
    "field": "val",
    "title": "val",
    "editor": "input",
    "formatter": "plaintext"
    "cellEdited": "function(cell){ this.send({ ui_control:{callback:'cellEdited'}, payload:cell.getValue(), oldValue:cell.getOldValue(), field:cell.getColumn().getField(), id:cell.getRow().getIndex() }); }"

  2. Then tried setting up a button to download the table as a space delimited csv file, again connected to table input
    { "command": "download", "arguments": [ "csv", "/home/pi/data.csv", { "delimiter": " " } ], "returnPromise": false }
    Neither of these seem to work. When I try to point to a cell and edit it, it selects, but I can't change anything.
    Can you help me see what setup I'm missing?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.