Topic: How to edit DB from TableEditor?
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 pro premium priority answered 3 years 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 pro premium priority commented 3 years 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 answered 2 years 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB CLI / MDB GO
- MDB Version: 3.4.0
- Device: Acer
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes