Opening details row in IE causes column widths to change...

Opening details row in IE causes column widths to change...

jelkins5jelkins5 Posts: 2Questions: 0Answers: 0
edited October 2010 in General
Hi allan,

Thanks for you constant effort on this project.

I am experiencing an issue using when opening a details row in IE. For some reason when I click the expand button and load a static HTML page, the datatables columns get squished to the right side as if I am not "colspanning" properly (I know this isn't the problem... just using as an example).

What makes this more peculiar is that if I do a column sort before opening a details row, when I do open the details row everything is rock solid, no column width changes, everything behaves as expected. It's as if during the detail row expansion, datatables is trying to calculate column width again.

I have defined all the column widths with aoColumns. The designer I work with has gone through the CSS and made all the values static.

This does not happen at all in Firefox. Firefox behaves exactly as expected.

I don't have a sample of the code, as this is being developed on an intranet, and I can't post the code outside (lame I know).

I am using the latest 1.7.3 version. This will most likely be a deal breaker if I can't get it to work right, and I have spent several weeks developing this app already...

Please HELP!

Thanks

Replies

  • jelkins5jelkins5 Posts: 2Questions: 0Answers: 0
    .... I have set bAutoWidth to false, too.

    Just tried defining the column widths in the tags via attribute and css... nothing works.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    I've not come across this problem before, but it sounds most odd! It's going to prove a bit difficult to debug without being able to see it unfortunately. Can you post the code that you are using possibly? Are you initialising the table when it is hidden perhaps? I suspect it can be solved with a call to fnAdjustColumnSizing ( http://www.datatables.net/api#fnAdjustColumnSizing ), but it would be interesting to know what is really happening.

    Allan
  • driztdrizt Posts: 1Questions: 0Answers: 0
    I have encountered the same problem. Example is easy, just as the DataTables api example, you can try to make a long text in a "td". Then the table will change a lot when you try to click the button.

    [code]
    /* Formating function for row details */
    function fnFormatDetails ( oTable, nTr )
    {
    var aData = oTable.fnGetData( nTr );
    var sOut = '';
    sOut += 'Rendering engine:'+aData[1]+'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '+aData[4]+'';
    sOut += 'Link to source:Could provide a link here';
    sOut += 'Extra info:And any further details here (images etc)';
    sOut += '';

    return sOut;
    }

    [/code]
  • lucasnplucasnp Posts: 18Questions: 0Answers: 0
    Allan, can you help us out on this one? I hit the same problem and looked over the forum for answer but no luck :(
  • lucasnplucasnp Posts: 18Questions: 0Answers: 0
    Well, I found a dumb fix is to set the width of the table you insert in the details row to a specific number, must be narrower than the size of the main table.

    It's not so smart solution but it's something I guess
This discussion has been closed.