Showing a datatable inside an editor form
Showing a datatable inside an editor form
dynasoft
Posts: 446Questions: 69Answers: 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
This discussion has been closed.
Answers
Hi @dynasoft ,
it would be worth looking at the CSV import example - this may do what you're after,
Cheers,
Colin
Many thanks.
IS it possible to show a dt inside an editor form?
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
Thanks
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.
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
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?
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
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)
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.
For anyone interested, I decided simply to use a bootstrap modal form as per https://getbootstrap.com/docs/3.3/javascript/#modals. It works well.