Rendering Hidden columns during init

Rendering Hidden columns during init

mcraigmcraig Posts: 20Questions: 2Answers: 0
edited April 2012 in General
I have a large table that, during initialization, insists on displaying hidden columns until the init is complete. This is showing the user content we don't want them to see. The columns shuffle while the columns are hidden until the final init is done. The more records for the table, the worse the problem. If I have to I'll hide it until it's done...I just want to be sure there is nothing else I should be doing. I cannot (at this time) make this server-side, it is populated purely by rendering an html table.

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    If its an HTML table, then DataTables will take the plain HTML table and make that into an enhanced DataTables version, but while that processing is occurring the plain HTML can be rendered by the browser - hence why you are seeing the "hidden" columns (that's a DataTables feature, and the table hasn't fully initialised yet).

    So the options are to load the data using Ajax or Javascript, or to put the table into a display:none element (although that can seriously slow down old IE browsers - you might want to consider using height:1px if you need to support IE6/7/8).

    Allan
This discussion has been closed.