Showing a datatable inside an editor form

Showing a datatable inside an editor form

dynasoftdynasoft Posts: 354Questions: 56Answers: 3

Hi

I need to allow user to work with text files inside an editor form. The idea is to allow the user to load a csv file, identify the columns by selecting headers from a drop-down and hitting the table headers which will show the selected headers. How can this be achieved with datatables/editor? I tried looking for info in the doc and examples but couldn't find anything. Thanks.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 9,780Questions: 0Answers: 1,619

    Hi @dynasoft ,

    it would be worth looking at the CSV import example - this may do what you're after,

    Cheers,

    Colin

  • dynasoftdynasoft Posts: 354Questions: 56Answers: 3

    Many thanks.

  • dynasoftdynasoft Posts: 354Questions: 56Answers: 3

    IS it possible to show a dt inside an editor form?

  • allanallan Posts: 52,624Questions: 1Answers: 8,050 Site admin
    Answer ✓

    It is, but it would require a custom field type that makes use of DataTables as an input element. It is something that we plan to introduce into Editor (built in) in future, but don't yet have a timeline for it since there are a number of things I want to do in DataTables to make the integration easier (e.g. layout of table control components).

    Allan

  • dynasoftdynasoft Posts: 354Questions: 56Answers: 3

    Thanks

  • dynasoftdynasoft Posts: 354Questions: 56Answers: 3
    edited March 26

    I'm having to write code around the topic of this thread. Hi, would using an MVC partial view work? Is this supported, ie loading a pv from inside an Editor form? Would you have some code I can run with? Thanks.

  • allanallan Posts: 52,624Questions: 1Answers: 8,050 Site admin

    No sorry - that isn't something that we support in Editor. The custom fields need to be defined per the docs here so that they are fully integrated with Editor.

    Allan

  • dynasoftdynasoft Posts: 354Questions: 56Answers: 3

    Thanks but I already had that link. Do you know when using a DT inside an editor form will be supported? I need to show a n editable table in a form, how can this be achieved?

  • allanallan Posts: 52,624Questions: 1Answers: 8,050 Site admin

    Its likely some time off yet I'm afraid. At the moment the closest is to parent child editing.

    I do have a prototype of a DataTable control as a field, but it only allows row selection (i.e. it is a replacement for the select input type) - it does not allow editing of the sub-data since that would require nested views.

    I expect to be working on that feature later in the year as it is something that I see as important - I just don't have much of a time scale beyond that I'm afraid.

    Allan

  • rf1234rf1234 Posts: 1,766Questions: 51Answers: 257
    edited March 28

    Hi everyone,
    I have basically only read this:
    "Thanks but I already had that link. Do you know when using a DT inside an editor form will be supported? I need to show an editable table in a form, how can this be achieved?"

    Question: Would an inline editable table in a (bootstrap 3) modal do as well? I mean that is not very much different from an editable table in a form, is it?

    I could show a solution that I've frequently been using:
    - the user selects a row of a "regular" data table (the parent table)
    - instead of clicking "edit" for the row the user clicks a custom button e.g. "edit something"
    - a modal opens showing an inline editable table containing "something"
    - depending on the use case the user can then only edit inline OR also edit the modal table using an editor form as well
    - sometimes I even have a second child data table in a second modal with its own editor which the user can open by clicking on a link in the first modal table etc..
    - no problem to have 3, 4 or 5 child tables in a sequence ... if the user still gets what is going on ...

    Parent table excerpt with categories button (categories CRUD):

    First modal:

    Second modal (also inline editable)

  • dynasoftdynasoft Posts: 354Questions: 56Answers: 3

    Hi
    Thanks for the idea. I might use it elsewhere but the problem is I use fields that from a base table which users can edit and also need to show fields from 3 other linked tables and to show everything neatly in the same support, ie an editor form is easier for me.

Sign In or Register to comment.