Table Editor Example

gkennedy pro premium asked 10 months ago

Hi there, do you have some example about how to use the Table Editor Plugin in order to send data to a backend? I can't find where o how  to connect the following code with the Table Editor Plugin:

$('#dtBasicExample').dataTable({

"processing": true,

"serverSide": true,

'ajax': {

    "type":"POST"

    "url":'/ws/areas/create',

    "data":function(d) {

    d.example_key1= $('#nombre').val();

},

"dataSrc":""

},

'columns': [

    { "data": "nombre" }

]

});


Piotr Glejzer staff commented 10 months ago

Hi,

our plugin editor to DataTable is working with each API from the main DataTable site. So did you try to use it like normal DataTable?

Best,

Piotr


gkennedy pro premium commented 10 months ago

Hi Piotr,

the thing is that I haven’t work with this before, so I’m looking for an example that shows how to do it. Do you have one that helps? I’m just trying to Post a simple table, let say a table with only a field

thank you.


Piotr Glejzer staff commented 10 months ago

Hi gkennedy,

yes, I know what you want to do but we don't have an example to show how it works for now. It should work with DataTable because we are using API from DataTable in our editor.
But I put that task to our list 'to do' with high priority label to check it and improve it. We are sorry about that problem. 

Best,

Piotr


itxlieni pro premium commented 7 months ago

Hi i ma looking for same example. Do i have to load both plugins? first .dataTables({...}) and then on same table .mdbEditor()? i am not able to get it running like that, also a example to send the data to server backend for processing would be nice :-) .mdbEditor({ data:data columns: [ { data: "taskname" }, { data: "location" }, { data: "todo" }, { data: "notes" } ]})


itxlieni pro premium commented 7 months ago

I found this usefull example. https://mdbootstrap.com/support/general/table-editor-plugin-configuration/


itxlieni pro premium commented 7 months ago

Seems it dosent work well, i can load data via ajax (datatables), table is built.If I add data by mbEditor it tells me:DataTables warning: table id=dtBasicExample - Requested unknown parameter 'taskname' for row 2, column 0.If i have static data and only load .mbEditor i can add data.I create a snippet maybe we can work there to finde a solution.

$("#dtBasicExample").dataTable( { ajax: { url: "[https://....php?" dataSrc: "tasks" }, columns: [ { data: "taskname" }, { data: "location" }, { data: "todo" }, { data: "notes" } ] }); $("#dtBasicExample").mdbEditor();


itxlieni pro premium commented 7 months ago

Snippet: https://mdbootstrap.com/snippets/jquery/itxlieni/391152


Anna Morawska staff commented 7 months ago

Hello, thank you for reporting the issue - we will take a closer look at this, and let you know how to solve this as soon as possible


Please insert min. 20 characters.
Status

Open

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: MacBook Pro
  • Browser: Google Chrome Version 70.0.3538
  • OS: macOS Mojave Version 10.14.1
  • Provided sample code: No
  • Provided link: No
Tags