Datatable inside custom form layout editor

Datatable inside custom form layout editor

wijwijwijwij Posts: 52Questions: 11Answers: 0

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

  • colincolin Posts: 12,681Questions: 0Answers: 2,167

    Yep, that's possible, it's discussed in this blog post,

    Colin

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    Thanks Colin

    I am looking for something that displays the child datatable in the editor custom form

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    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!

  • colincolin Posts: 12,681Questions: 0Answers: 2,167

    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 folder https://editor.datatables.net/examples/datatables/nested.html,

    Colin

  • wijwijwijwij Posts: 52Questions: 11Answers: 0
    edited March 15

    Thank you Colin,

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    Colin,
    Appreciate if you can guide me on where to find this example code

    Wij

  • kthorngrenkthorngren Posts: 13,844Questions: 25Answers: 3,262

    In the Wiring it together section there is a link to the code:

    If you would like to see the fully assembled Javascript used in this post, it is available here. The CSS used is also available, although this is just for the row detail buttons and to highlight the child row.

    Kevin

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    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

  • colincolin Posts: 12,681Questions: 0Answers: 2,167

    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

  • colincolin Posts: 12,681Questions: 0Answers: 2,167

    The provided link sent me to the javascript code. I am looking for the full .net example

    As I said, download the .NET version!

    Colin

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    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

  • colincolin Posts: 12,681Questions: 0Answers: 2,167

    Ah, the link should be :https://editor.datatables.net/examples/advanced/parentChild.html . Apologies for the confusion, that's also in the download,

    Colin

  • wijwijwijwij Posts: 52Questions: 11Answers: 0
  • kthorngrenkthorngren Posts: 13,844Questions: 25Answers: 3,262

    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

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    Thanks Kevin,
    Yes, I need the model, controller, and Html, please

  • kthorngrenkthorngren Posts: 13,844Questions: 25Answers: 3,262
    edited March 15 Answer ✓

    Do the UsersController.cs and SitesController.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

  • wijwijwijwij Posts: 52Questions: 11Answers: 0

    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

Sign In or Register to comment.