Only the first column is rendered with server side processing

Only the first column is rendered with server side processing

ScapponianScapponian Posts: 5Questions: 0Answers: 0
edited October 2011 in General
This is my first attempt at retrieving data with the datatables server side processing.
The problem is that it's only showing just the first column. And you can see by the json response that all the data (4 columns) is being passed correctly.

JSON:
{"sEcho": 1,"iTotalRecords": 101,"iTotalDisplayRecords": 101,"aaData": [["False","4-MOST * Denture Repair Kit - Liquid","Dental","HYGENIC"],["False","4-MOST * Denture Repair Kit - Powder","Dental","HYGENIC"],["False","ABC * DUAL CEMENT - Catalyst","Dental","IVOCLAR-VIVADENT"],["True","Abcocide 28","Dental","METREX RESEARCH"],["False","ABRASIVE WHEELS * Rubber Bonded","Dental","HALL"],["False","ABRASIVE WHEELS * Vitrified Red","Dental","SANDUSKY"],["False","ABSOLUTE * Accelerator","Dental","GC AMERICA"],["False","ABSOLUTE * Adhesive","Dental","GC AMERICA"],["False","ABSOLUTE * Base","Dental","GC AMERICA"],["False","ABSORBENT PAPER POINTS","Dental","GENERIC"]]}

[code]

$(function() {
$('#tblTest').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "query.aspx"
});
});

[/code]

[code]





[/code]

What am I missing here?


Thanks!

Replies

  • BigBadBurrowBigBadBurrow Posts: 6Questions: 0Answers: 0
    Table header information before the tbody:



    col1
    col2
  • ScapponianScapponian Posts: 5Questions: 0Answers: 0
    Yep, tried that too. If I add in a single it'll post the first column like usual. If I add in more than one it'll never populate the date, just sits there saying Processing.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    link to your poject?
  • ScapponianScapponian Posts: 5Questions: 0Answers: 0
    http://physres.ipns.com/test.aspx
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    Your table has no

    [code]







    [/code]

    please re-add the thead.
  • ScapponianScapponian Posts: 5Questions: 0Answers: 0
    Added the with 4 tags. As you see now it won't display any data.
    If I remove the or just leave it at one it'll show a single column.

    [code]


    1
    2
    3
    4





    [/code]
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited October 2011
    [quote]GET http://physres.ipns.com/query.aspx?sEcho=1&iColumns=4&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&iSortingCols=1&iSortCol_0=1&sSortDir_0=asc&bSortable_0=false&bSortable_1=true&bSortable_2=true&bSortable_3=true&_=1320089259800 500 (Internal Server Error)[/quote]

    how is your server configured? it's saying it can't honor this URL request.

    maybe switch to using POST? you'd have to override the fnServerData as per this link:
    http://www.datatables.net/ref#fnServerData (the 2nd entry shows using POST)
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    errors in your server side script. use the stack trace to debug
    http://physres.ipns.com/query.aspx?sEcho=1&iColumns=4&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&iSortingCols=1&iSortCol_0=1&sSortDir_0=asc&bSortable_0=false&bSortable_1=true&bSortable_2=true&bSortable_3=true&_=1320089259800

    and even
    http://physres.ipns.com/query.aspx
  • ScapponianScapponian Posts: 5Questions: 0Answers: 0
    I've found the issue.

    bSortable_1=true but iSortCol_0 & sSortDir_0 are being set.

    Thank You for all the help!
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    Awesome. looks good.
This discussion has been closed.