Gridview with CRUD option in template node

Hi.

I would like create a Grid with CRUD with information of mongodb in template node.

I used the example below but that something wrong.

https://flows.nodered.org/flow/e32f2b942bce77ef6079c0642b93c036

Above my flows for this solution.

[{"id":"fa1afd8d.1da5","type":"mongodb2 in","z":"99228db4.867d9","service":"_ext_","configNode":"2f9556c4.ba9c0a","name":"","collection":"clients","operation":"find.toArray","x":400,"y":80,"wires":[["f779d2c3.7aa16"]]},{"id":"6cda69ad.971288","type":"debug","z":"99228db4.867d9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":750,"y":80,"wires":[]},{"id":"f779d2c3.7aa16","type":"json","z":"99228db4.867d9","name":"","property":"payload","action":"","pretty":false,"x":570,"y":80,"wires":[["6cda69ad.971288","c32b0548.c6e858"]]},{"id":"c4d582ff.4b5ed","type":"function","z":"99228db4.867d9","name":"QUERY","func":"msg.payload = {\"nome\": /^V/};\nreturn msg;","outputs":1,"noerr":0,"x":220,"y":80,"wires":[["fa1afd8d.1da5"]]},{"id":"c32b0548.c6e858","type":"ui_template","z":"99228db4.867d9","group":"753fa281.30f57c","name":"","order":0,"width":"0","height":"0","format":"<!DOCTYPE html>\n<html lang=\"fr\">\n<head>\n    <title>Licence Plate</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-timepicker/0.5.2/css/bootstrap-timepicker.min.css\" />\n    <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\"></script>\n    <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script>\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css\" />\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css\" />\n    <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js\"></script>\n\n    <script type=\"text/javascript\">\n        $(function () {\n            var db = {{#payload}}{{{.}}}{{/payload}};\n                $(\"#jsgrid\").jsGrid({\n                    width: \"100%\",\n                    inserting: true,\n                    editing: true,\n                    sorting: true,\n                    paging: true,\n\n                    data: db,\n\n                    fields: [\n                        { title:\"Nome\", name: \"nome\", type: \"text\", width: 50 },\n                        { title:\"Telefone\", name: \"telefone\", type: \"text\", width: 50 },\n                        { title:\"E-Mail\", name: \"email\", type: \"text\", width: 50 },\n                        { type: \"control\" }\n                    ],\n               \n                    controller: {\n                        insertItem: function(item) {\n                            return $.ajax({\n                                type: \"POST\",\n                                url: \"/insert\",\n                                data: item\n                            });\n                        },\n                        updateItem: function(item) {\n                           return $.ajax({\n                                type: \"PUT\",\n                                url: \"/update\",\n                                data: item\n                            });\n                        },\n                        deleteItem: function(item) {\n                            return $.ajax({\n                                type: \"DELETE\",\n                                url: \"/delete\",\n                                data: item\n                            });\n                        }\n                    }   \n                });\n            });\n    \n  </script>\n</head>\n<body class=\"container\">\n    <section class=\"row\">\n        \n        <div class=\"col-md-6\"></div>\n        <div class=\"col-md-6\" id=\"jsgrid\">\n        </div>\n    </section>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":740,"y":120,"wires":[[]]},{"id":"2f9556c4.ba9c0a","type":"mongodb2","z":"","uri":"mongodb://localhost:27017/db","name":"db","options":"","parallelism":"-1"},{"id":"753fa281.30f57c","type":"ui_group","z":"","name":"CADASTRO DE CLIENTES","tab":"88691dcd.c7444","order":2,"disp":true,"width":"17","collapse":false},{"id":"88691dcd.c7444","type":"ui_tab","z":"","name":"CADASTRO DE CLIENTES","icon":"dashboard"}]

Unfortunately your flow isn't currently importable.Please read the following post How to share code or flow json and then edit the above message.