Best way to format data returned from server-side

Best way to format data returned from server-side

BelisariusBelisarius Posts: 26Questions: 0Answers: 0
edited April 2012 in General
Hi,

After quite a long break I'm back using Datatables and it's taking me a while to get my head around it again! So I'd appreciate a couple of pointers please? I've got server side processing working (Classic ASP I'm afraid..) but I need to know the best way of doing the following:

Format the contents of a cell based on the data: I've got this working from the server side by inserting some html into the return JSON however it seems a bit of a faff dealing with quotes and double quotes in the HTML? Am I missing an easier way? Also, I want to add the title setting but I assume this will have to be done client side?

I have four columns that need either a hyperlink or an image/link in them. Is this better server or client side (fnRowCallBack?)

And finally... I downloaded jQueryUI and the default 'theme' but existing CSS seems to override some of the theme? Do I need to make sure my table/datatables has no CSS attached at all before activating the theme? And should both UI and Datatables be using the same verion of jQuery?

Hope that lot makes sense...

Cheers

Andy

Replies

  • BelisariusBelisarius Posts: 26Questions: 0Answers: 0
    OK, I'm finally getting somewhere...

    I'm using
    [code]
    "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
    if ( aData[1] == "Standard" ) {
    $("td:eq(1)", nRow).attr("title", "Warehouse");
    }
    },
    [/code]

    This seems to work OK but performance seems to have really taken a hit. Paging name takes a good 3-4 seconds whereas before it was 1-2. Is there any better way of doing this as I need to do more processing of cells and am worried it's going to get worse?

    Cheers

    Andy
This discussion has been closed.