Trying to load once via ajax from server and then sort and filter on client side.
Trying to load once via ajax from server and then sort and filter on client side.
RobbSadler
Posts: 5Questions: 0Answers: 0
I am trying to get my data from the server via ajax one time and then use client side sorting, filtering, etc.
I thought this would accomplish that, but it only pulls data if I have bServerSide set to true:
[code]
$(document).ready(function () {
var oTable = $('#dataTableAccountList').dataTable({
"bServerSide": false,
"bDeferRender": true,
"sAjaxSource": '/AccountList/GetData'
});
$('.dataTables_length select').uniform();
$('.dataTables_paginate > ul').addClass('pagination');
});
[/code]
If I set it to true I get the data, if I set it to false I get "No data available in table"
Guessing that I am missing something simple. The page is not yet published, but if you need me to get something out there then I will put it together.
Thanks!
I thought this would accomplish that, but it only pulls data if I have bServerSide set to true:
[code]
$(document).ready(function () {
var oTable = $('#dataTableAccountList').dataTable({
"bServerSide": false,
"bDeferRender": true,
"sAjaxSource": '/AccountList/GetData'
});
$('.dataTables_length select').uniform();
$('.dataTables_paginate > ul').addClass('pagination');
});
[/code]
If I set it to true I get the data, if I set it to false I get "No data available in table"
Guessing that I am missing something simple. The page is not yet published, but if you need me to get something out there then I will put it together.
Thanks!
This discussion has been closed.
Replies
Allan