37 columns in a datatable

37 columns in a datatable

denilshahdenilshah Posts: 7Questions: 0Answers: 0
edited September 2013 in General
Hello,

We've a datatable (version 1.7.5) using AJAX as the data source in ASP.NET. The data table consists of 37 columns and is displayed completely in the development environment. However, when it is moved to the testing environment (IIS 7), no data gets displayed in the table. If the total no. of columns are brought down to 28, the data starts displaying properly.

We also tried setting JSONMAxDataLength in web.config but doesn't work.

Is there any restriction on the size or no. of columns?

I've been stuck up with the problem since the last 2 weeks. Kindly let me know any workable solution.

Many Thanks,
Denil

Replies

  • khiyarakhiyara Posts: 2Questions: 0Answers: 0
    NO THERE IS NO PROBLEM IN COLUMN SIZE, MAY BE THE PROBLEM WOULD BE IN YOUR BUSINESS LOGIC :-P CHECK YOUR CODE PROPERLY OR SEND YOUR CODE HERE...!!
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    > Is there any restriction on the size or no. of columns?

    No there isn't. If you are using server-side processing and GET then your server might be limiting the GET URL size. However, without a test case, I can't say if this is the case. Please link to a test case as noted in the forum rules.

    Allan
  • denilshahdenilshah Posts: 7Questions: 0Answers: 0
    Hello,

    The JSON is getting generated properly on the server side. Also, we're trying to make visible just a single record.

    However, there is no record behind shown in the datatable. Very strange behavior.

    The JSON generated from the server side is:

    {"sEcho":2,"iTotalRecords": 1180,"iTotalDisplayRecords": 1,"aaData": [[9,"View","","","21-Jun-2012","A00044444","Tampered Age Proof" ,"Replacement","","AB1635" ,"Kailash Prasad" ,"dfg" ,"dfg" ,"Patna 2","29" ,"Central","DSF","" ,"" ,"17-Jan-2013","","","","","","Accepted","","",""]]}


    And the rendering in the page is:

    var oTable = $('#appList')
    .dataTable(
    {
    "oLanguage": {
    "sSearch": "Search all columns:"
    },
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "../UnderwritingDataTablesJSON.aspx?Type=Compliance&FromDate="
    +FromDate+"&ToDate="+ToDate,
    "bAutoWidth": false,
    "aoColumns": [{
    "sWidth": "3%"
    }, {
    "sWidth": "8%",
    "bSortable" : false
    }, {
    "sWidth": "8%",
    "bSortable" : false
    }, {
    "sWidth": "8%",
    "bSortable" : false
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }, {
    "sWidth": "9%"
    }
    ],
    "sPaginationType": "full_numbers"
    });
    $("#appList thead input").keyup(
    function() {
    /* Filter on the column (the index) of this element */
    oTable.fnFilter(this.value, $(
    "#appList thead input").index(this));
    });

    $("#appList thead input").each(function(i) {
    asInitVals[i] = this.value;
    });

    $("#appList thead input").focus(function() {
    if (this.className == "search_init") {
    this.className = "";
    this.value = "";
    }
    });

    $("#appList thead input").blur(
    function(i) {
    if (this.value == "") {
    this.className = "search_init";
    this.value = asInitVals[$(
    "#appList thead input").index(this)];
    }
    });
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    We need a link to the page to be able to offer any further help. It looks like it should be working okay.

    Allan
  • denilshahdenilshah Posts: 7Questions: 0Answers: 0
    With ref. to this suggestion,

    http://www.datatables.net/forums/discussion/5960/how-many-columns-can-i-add-from-datatable-by-aocolumns/p1

    we tried "sServerMethod": "POST" as well. BUt no success so far.
  • denilshahdenilshah Posts: 7Questions: 0Answers: 0
    This has been sorted out by putting








    in web.config.

    Thanks for all the assistance.
  • denilshahdenilshah Posts: 7Questions: 0Answers: 0
    Hi,

    The problem we're facing is that the data table is not visible in IE7. It works perfectly in IE 8 and above. Kindly let me know if there is any fix for the same.

    Regards,
    Denil
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    As I have mentioned several times, link to a test case please, as noted in the forum rules. Otherwise we cannot help.

    Allan
  • denilshahdenilshah Posts: 7Questions: 0Answers: 0
    Hello Allan,

    We upgraded from Datatables 1.7.5 to 1.9 and now we're able to see the records.

    The problem we're facing now is inside the thead declaration, we have the column headers as well as the filter textboxes, which cause the formatting distortion due to css being applied to the cells containing search textboxes. It works fine when we move the filter textboxes to tfoot but we don't want the search in tfoot.

    The sample html generated is as below:






    Id
    View
    Edit
    Delete
    Case initiated by
















    I hope this gives you a fair idea of what the problem is.

    Many Thanks,
    Denil
This discussion has been closed.