Need Help Formatting an empty table

Need Help Formatting an empty table

markphillipsmarkphillips Posts: 4Questions: 0Answers: 0
edited September 2012 in General
I have a table setup to use x and y scrolling, with the first column fixed. When there is data in the table, it all works as advertised. :) However, before I get the data from the server into the table, it looks terrible. The header row extends well beyond the normal size of the table. What is the best way to handle tables that are empty?

Thanks,

Mark

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I must admit I've never found a good way to handle this. The only way I've thought of is to use the dataTable_empty class and have the 'table empty' text aligned left, with perhaps a text indent used. Not perfect, but it might look better!

    The other thing is not to use sScrollXInner if you currently are.

    Allan
  • markphillipsmarkphillips Posts: 4Questions: 0Answers: 0
    Allan,

    Thanks for your comment. I finally just removed the table from the html until there was data available, then I put it back. I have to use sScrollXInner as I have bot x and y scroll bars.

    Mark
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    sScrollXInner still shouldn't be needed unless you want to force width. With just sScrollX: "100%" DataTables will enable x-scrolling only when needed.

    Allan
This discussion has been closed.