Question on loading select dropdown date
Question on loading select dropdown date

in DataTables 2
Just a generic question maybe someone could point me in the right direction?
I was looking for a way to load the data for a select dropdown with the normal page data that gets sent on a table load via server side. I Wasn't sure if theres a way do do that as i haven't found the right spot through googling yet. Any help in pointing me to the right direction is appreciated.
Answers
Not sure exactly what you are wanting but does this example help?
Kevin
In case you are using Editor you can load the options using an options instance on the server
https://editor.datatables.net/examples/advanced/joinArray.html
Take a look at field "users.site" in the client and the server scripts please.
@kthorngren
Something similar.
Was getting hangry as it was close to lunch time so i didn't explain it as good as i should have.
So, When the table is loaded, the server sends the data to the client and it loads whatever.
There is 1 column that gets changed, When that column is updated and the data is returned back to datatables to get re drawn, one of the columns gets updated with say a device name.
What i'm looking to do is, Pass in additional information like a list of ports, That gets converted to a dropdown (Or better, an autocomplete box) for that column only on that particular row.
I can easily send the data back to the frontend, but i'm stuck at how to get it to render to a specific row / column dynamically.
I would like to avoid turning it into an ajax request, and just send it back with the first ajax request data on the same call, if that makes sense.
The example I linked to provides select inputs to allow for searching the table. Sounds like you have or want select inputs in the table like the Office column of this example.
How does this happen?
You can do that. One option might be to use
columns.render
to update the select options for the particular cell in the row being updated.Can you provide a link to a test case that shows what you currently have so we can better understand your solution for more specific suggestions?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin