Master Detail Tables
Master Detail Tables
Hi
I am new to Datatables and trying to create two tables (i.e. Master and Detail). Detail table rows should be based on the ID in the Master table. I am following the tutorial https://datatables.net/blog/2016-03-25 and everything working fine while following the same from end to end. Please also note that I am not using DataTables but not DataEditor and hence, I skipped the DataEditor parts. I will be using the same approach down the road.
The issue is that my Master table is being populated on page load through PHP script without any issues. When I select any row in the Master table, I need to call a PHP script that runs a query to select all the records from Detail table based on the ID from Master table I passed and return the set of records.
Afterwards, I want to show all the returned records in the Detail table using AJAX.
Prompt support as well as a working example (if possible) would be highly appreciated.
Thanks in advance.
This question has an accepted answers - jump to answer
Answers
Sorry but I'm confused. Have you implemented this and it doesn't work or are you asking about how to implement without the Editor portion?
There is a working example in the blog you linked to. Do you have questions about the example in the blog?
The best way for us to help is for you to provide a link to your page or a test case showing the issues you are having.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thanks @kthorngren for your prompt response. Let me keep it simple and straight while excluding the extra information.
Let's say:
And I want to use AJAX rather than reloading the page. Plus, I only want to use the DataTable and no DataEditor at all.
Makes sense?
I remembered putting this simple example together based on the blog example:
http://live.datatables.net/biliniyu/1/edit
Basically you can use the example in the blog and ignore the Editor configs. Both the blog and my example use Ajax and don't reload the page.
Do you have specific questions about the blog or my example? I'm not sure what else to provide to help you.
Kevin
Thanks @kthorngren. Your example is more close to what I needed.