DataTables intialization hides all the rows of the table (asp.net grid view)

DataTables intialization hides all the rows of the table (asp.net grid view)

jigsjigs Posts: 1Questions: 0Answers: 0
edited January 2012 in Bug reports
I m using asp.net grid view to render table on my HTML and DataTables to enhance it. After inserting a thead element in the table. and inserting a row into it, i am initializing the DataTable. On doing so All the rows get disappeared

Replies

  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    Are they in a tbody? Can you give us a link?

    Allan
  • VinceHanVinceHan Posts: 2Questions: 0Answers: 0
    I am also using jquery datatable on gridview in ASP .NET. I used the GridviewFix plugin to take care of the tbody and thead tags. http://www.codeproject.com/Articles/267001/GridviewFix-helper-plugin

    However, in one of my pages, when Initialize the datatable, all rows get disappeared.

    Here is the datatable initialization.
    [code]
    $(document).ready(function () {
    $('#<%=productPriceListGW.ClientID%>').GridviewFix().dataTable({
    "sDom": 'WR<"H"f>t',
    "oColumnFilterWidgets": {
    "aiExclude": [0, 1, 2]
    },
    "aoColumns": [
    { "bSortable": false },
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null
    ],
    "bJQueryUI": true
    });
    });
    [/code]
  • VinceHanVinceHan Posts: 2Questions: 0Answers: 0
    And here is part of the HTML code for the gridview
    [code]










      
      








































































    ...

    [/code]

    I did tried to use the basic initialisation
    [code]
    $(document).ready(function () {
    $('#<%=productPriceListGW.ClientID%>').GridviewFix().dataTable();
    });
    [/code]

    And it gives me the error: "assorting" is null
This discussion has been closed.