Datatable inside custom form layout editor
Datatable inside custom form layout editor
Hi,
I wonder if it is possible to show a chile datatable that belongs to a row inside the parent table inside the custom form layout editor
My scenario:
I have a parent data table. I want to let the user select **a row, then **click **the **edit **button, and then a **custom form layout shows in the editor that contains couple fields and a child datatable that belongs to the parent table
Is this possible?
Your help appreciated
Regards
This question has an accepted answers - jump to answer
Answers
Yep, that's possible, it's discussed in this blog post,
Colin
Thanks Colin
I am looking for something that displays the child datatable in the editor custom form
This example is wonderful and exactly what I need. I wonder if there is a sample .net script to run and learn from. By the way, I have downloaded and using Editor 2!
Yep, the Editor download has all the examples from main site - this is the same nested one as the blog post. You'll find
SitesNested.cs
in the download folderhttps://editor.datatables.net/examples/datatables/nested.html
,Colin
Thank you Colin,
Colin,
Appreciate if you can guide me on where to find this example code
Wij
In the Wiring it together section there is a link to the code:
Kevin
Thank you kthorngren.
The provided link sent me to the javascript code. I am looking for the full .net example
I wonder if it can be found inside Editor 2?
Thanks though
That's what I pointed you to in my previous answer earlier today. Can you look at that, please . I'm not clear why you rejected that as an answer - can you explain, please.
Colin
As I said, download the .NET version!
Colin
Hi Colin,
Thank you for taking the time to reply back. I really need the sample .net script for this example but in your reply, you were referring to this example
I will appreciate it if you can provide me with the link to the full .net example for this one (Parent/child editing in child row)
Thank you so much though
Ah, the link should be :https://editor.datatables.net/examples/advanced/parentChild.html . Apologies for the confusion, that's also in the download,
Colin
Thanks Colin
This link
https://editor.datatables.net/examples/advanced/parentChild.html
is not the same as this one
https://datatables.net/blog/2019-01-11
I really need this one : https://datatables.net/blog/2019-01-11
In looking at the two examples it looks like the only difference is how the client side child table is handled; one being a standard Datatable and the other being a child row detail table. The backend server script should be the same for both.
Do you have specific questions or issue trying to implement the https://datatables.net/blog/2019-01-11 example?
Kevin
Thanks Kevin,
Yes, I need the model, controller, and Html, please
Do the
UsersController.cs
andSitesController.cs
controllers from the Editor download not work?All the client side code can be found in the blog you linked. If you want the actual HTML for the
table
you can view the page source to find it.I might be wrong but I don't think there is a pre-built full example of the https://datatables.net/blog/2019-01-11 that you can download.
Kevin
Thanks Kevin,
Though there might be a full pre-built example similar to the ones in the downloaded purchased package
Thanks a lot for you and for Colin