Let the editor create the form based on Ajax
Let the editor create the form based on Ajax
OlivierOlmer
Posts: 3Questions: 1Answers: 0
in Editor
Hello,
I have a datatable and within this table only a small part of my data is shown. To preserve bandwith I only send the data that should be shown in the datatable.
When I edit however it should fetch more data about that certain row from the server first, before building the form.
Is this somehow possible?
Example:
The data for the datatable:
{
"data":[
{
"testColumn1": "a",
"testColumn2": "a",
"testColumn3": "a"
}
]
}
The data when editing:
{
"data":[
{
"testColumn1": "a",
"testColumn2": "a",
"testColumn3": "a",
"testColumn4": "a",
"testColumn5": "a",
"testColumn6": "a",
"testColumn7": "a",
"testColumn8": "a",
"testColumn9": "a"
}
]
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There isn't any built in option for this.
However, you could possibly trigger you Ajax data fetch, then use
row().data()
to update the row's data in the DataTable and only then start the edit (since the full data is then available).That is the only way I can think of at the moment for this case.
Allan
Thanks, that should do it :D