DataTables_sort_wrapper - Issue

DataTables_sort_wrapper - Issue

prsdprsd Posts: 14Questions: 0Answers: 0
edited July 2012 in General
I have a datatable which gets generated everytime when I click on one of "href" element. If I click on this element multiple times then the datatable 'th' - column do not behave properly.

First time when I click on this href element the datatable is populated. For that, the first column generated on firebug is:
[code]


Order Name



[/code]

However, if I click on multiple times (say 4) on the same href element then the generated first columns is:
[code]





Order Name






[/code]

It is changing the with of the column header and giving me error in firebug as -

[code]
DataTables warning (table id = 'example'): The table cannot fit into the current element which will cause column misalignment. It is suggested that you increase the sScrollXInner property to allow it to draw in a larger area, or simply remove that parameter to allow automatic calculation
[/code]

Datatable generation code: http://live.datatables.net/ijebol/edit#javascript,html

I tried to correct datatable generation as per suggestion from error. But nothing is changing.
Can someone please help me with this?

My issue sounds similar to: http://www.datatables.net/forums/discussion/4730/datatables_sort_wrapper-being-added-to-columns-with-bsortable-false/p1

Thanks!

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Do you have a working example showing the issue that you can give us? Also, which version of DataTables are you using? If not already on 1.9.2, it would be worth upgrading to see if that helps.

    Allan
  • prsdprsd Posts: 14Questions: 0Answers: 0
    edited July 2012
    Thanks allan for your reply! Can you please tell me how I can show you the working example. Currently, I have this working on localhost.

    BTW, I observed that the 'th' does not change its size when I make changes like:

    [code]
    table.display thead th div.DataTables_sort_wrapper {
    position: relative;
    padding-right: 20px;
    padding-right: 20px;
    width: 20px; ----This is the change --
    }
    [/code]

    Is there anyways that I can apply this change specific to #example which is my table. Something like:

    [code]
    #example.display thead th div.DataTables_sort_wrapper {
    position: relative;
    padding-right: 20px;
    padding-right: 20px;
    width: 20px;
    }
    [/code]

    Silly, question - how can I check the datatable version I am running?
    The file where I am making changes has following details at the top. And, there are some more datatables in our application referring to this file. How can I ask my datatable to refer to new datatable version?

    [code]
    * File: demo_table_jui.css
    * CVS: $Id$
    * Description: CSS descriptions for DataTables demo pages
    * Author: Allan Jardine
    * Created: Tue May 12 06:47:22 BST 2009
    * Modified: $Date$ by $Author$
    * Language: CSS
    * Project: DataTables
    *
    * Copyright 2009 Allan Jardine. All Rights Reserved.
    [/code]
    Thanks again!
  • prsdprsd Posts: 14Questions: 0Answers: 0
    edited July 2012
    Update - I tried by including 'demo_table_jui.css' and 'jquery.dataTables.min.js' from version 1.9.2 but there is no change in the result.
  • prsdprsd Posts: 14Questions: 0Answers: 0
    Update - Hi allan, datatable reinitialization worked fine. You may mark this as resolved.

    Thanks for your help and time!
This discussion has been closed.