Help! Struggling with basic customisation with datatables

Help! Struggling with basic customisation with datatables

bsukbsuk Posts: 92Questions: 26Answers: 2
edited February 2014 in General
Hi, I've read the site documentation regarding customisation, but am still struggling..

My objective is very simple: To end up with a table styled exactly like the one here:
http://datatables.net/release-datatables/extras/TableTools/theme.html

I have pasted the initialisation javascript code, but it doesn't work. I get the message:
"Loading data from server" and no styles are applied.

If I use my standard initialisation code:


$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": false,
"bServerSide": true,
"sAjaxSource": "/myserver/mysite/processing.php"
} );
} );


The table displays and works, but without any styling/box/buttons etc

I'd like to use the identical CSS and all required JqueryUI settings to exactly replicate the look of the table in the example.
Is there some particular order that the initialisation code needs to be stated in?
Or do the server side settings need to be in a separate section?

Many thanks in advance for any pointers.
(by the way, I cannot link to the problem site as it's running on an internal server, not on the internet).

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    The only thing I can say, without a test case, is that you haven't used the bJQueryUI option. If that doesn't help, then, without a test case, we can't help.

    Allan
  • bsukbsuk Posts: 92Questions: 26Answers: 2
    Thanks Allan.

    As soon as I introduce the line: "bJQueryUI": true
    the table stops working and reports the "Loading data from server" error.

    I appreciate you can't help any more without an example so I'll have to keep figuring it out, maybe with a clean install and client side tables etc.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Sounds like a JS error - have a look at the console in your browser.

    Allan
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    [quote]without any styling/box/buttons etc[/quote]
    Are you sure you have downloaded and linked all the relevant CSS and JS files? (Compare with page source for the example.)
This discussion has been closed.