Topic: How to edit DB from TableEditor?

Wladi79 priority asked 1 year ago


Good afternoon, I was able to display information through a database query through the TableEditor script. https://prnt.sc/BwMxwwgCEb3Q But I do not understand how to change the functionality of these buttons to Add / Delete / Edit rows in the database. https://prnt.sc/6TIpzTaGtwGS I could not find information specifically for TableEditor in the documentation. Can someone explain and show with a real example or piece of code?


Arkadiusz Cacko staff answered 1 year ago


Hi @Wladi79,

here is the API documentation for TableEditor standard version https://mdbootstrap.com/docs/standard/plugins/table-editor/#docsTabsAPI. There are some events that might be helpful for update database on specific action.

For example for adding row

tableEditorEl.addEventListener('add.mdb.tableEditor', function(e) {
   // Here you can send request to update your database if any row will be added 
}); 

Wladi79 priority commented 1 year ago

Could you write an example of adding and editing a row in database using this method? Because I don't really understand what you need to write here (


Gabby free answered 1 year ago


Good Day, Am new to publishing on MDBootstrap. I deployed my sample Nodejs backend with my mongodb string set to localhost. I would like to know how to change it to a mongodb atlas DB connection string.

Thank you Gabriel Oni



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB CLI / MDB GO
  • MDB Version: 3.4.0
  • Device: Acer
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes