gkennedy free asked 6 years 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 6 years 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 free commented 6 years 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 6 years 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 free commented 5 years 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 free commented 5 years ago

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


itxlieni free commented 5 years 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 free commented 5 years ago

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


Anna Morawska staff commented 5 years 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.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • 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