Reputation: 33
DataTable initialisation, give it the server url location
oTable = $('.entrys_table').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "entrys_table_server_side_source",
"type": "POST"
},
"language": {
"infoFiltered": " - filtered from _MAX_ records"
},
"columns": [
{ data: "engine" },
{ data: "browser" },
]
})
yadcf.init(oTable, [
{
column_number: 0,
filter_container_id: 'account1',
filter_type: 'select',
},
{
column_number: 1,
filter_container_id: 'account2',
filter_type: 'select',
},
], { externally_triggered: true });
But I would like to ask how to make yadcf URL location is different?
More hope is that each option can have a separate URL location?
And let the option can be updated independently of the data (again to the server to get the latest information)
Any help is appreciated.
Upvotes: 3
Views: 215
Reputation: 37061
The only possible way that can I think of is to use yadcf along with third party select plugin (chosen / select2) and load its data using ajax
Something like Jquery Chosen plugin - dynamically populate list by Ajax or Select2 Ajax (remote data)
In addition please take a look at the following issue that was eventually resolved and looks like it might be useful for you ajax populated fields + externally_triggered + server_side removing fields value
Upvotes: 1