how to create server side datatables specifically for select option(dropdown list )
how to create server side datatables specifically for select option(dropdown list )
husain
Posts: 5Questions: 1Answers: 0
Hello Sir , I have Searched but there is no reply for my Issue,
I have more than 10000 records and I want to display Name and Id inside dropdown list(not inside table or row) simply with php is possible but it has loading.
or I want have only dropdown list not table records
in bellow example I dont want to have table I only want dropdown list
<select id="example">
<option> data come from datatables</option>
</select>
Thank you.
Answers
See Allan's first comment in this thread for the way to handle this.
Kevin
@kthorngren thank you for your answer but I don't want to include my select option inside table , I want to use my select option as whole table.
Do you mean you want the select options listed in a column in a table? Or just a select control outside of the table?
Colin
@Colin yes Sir ! I want just a select control outside of the table not relate to table ?
if my suggestion is not possible , even by default I don't want to show all the data inside select option , when I search items all items should be appear inside dropdown list , then I can manage the dropdown list id and name.
for now by default all my records (10000 items) are display inside select control,
and only problem is: it has loading... if I do with datatables.net server side it will not have loading.
I might not understand what you mean but this wouldn't be controlled by Datatables. Use a jQuery ajax() request to the server to fetch the options you want. In the success function build your options list.
Kevin
@kthorngren yes this jQuery ajax() was my second option, I knew about this,
but I thought it is possible with datatables.
thank you.