Auto Width false, but still not using size values?

Auto Width false, but still not using size values?

pwc1011pwc1011 Posts: 62Questions: 0Answers: 0
edited July 2010 in General
Hello Allan,

Can't believe you finished 1.7.4 so quickly. You really are a beast! :-)

I have bAutoWidth = false, and a value for each column width, however, they are still not being sized according to the size provided. I have sScrollX set to "100%".

Any thoughts on what I might need to do?

Thanks!
Patrick

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    1.7 beta 4 rather than 1.7.4 - it's still "pre-release" software - hence little issues like this...

    I haven't actually experimented much with auto width disabled for scrolling tables, although I will have a bit of a poke around with it later on. At the moment, my feeling is that autowidth is required for scrolling - although the other fixes I'll need to make for the next beta might change that...

    Allan
  • pwc1011pwc1011 Posts: 62Questions: 0Answers: 0
    That's good to know about auto width for scrolling. I didn't know that.

    I did trace through the code and found that everything is fine right up until in _fnScrollDraw. When this line executes,

    nScrollHeadTable.style.width = $(o.nTable).outerWidth()+"px";

    The table columns are resized to where the total of all column widths combined now equals the width of the visible table area.

    I'll try now with auto sizing.

    btw... having stepped through the code again, I'm more impressed by the release :-)
  • pwc1011pwc1011 Posts: 62Questions: 0Answers: 0
    arg...

    Auto Width didn't do anything. Still crunches down to fit into the table area. Not sure what I could be doing wrong. Everything seems fine until after the ajax call. Then the table goes through the rebuild and suddenly changes size.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Look for the line: o.nTable.style.width = (o.oScroll.sXInner !== "") ? o.oScroll.sXInner : "100%";
    and replace it with: o.nTable.style.width = $(o.nTable).outerWidth()+"px";
    and see what happens...

    It's not a perfect change, but this is the area I'll be working on later on for the next beta revision.

    Allan
  • pwc1011pwc1011 Posts: 62Questions: 0Answers: 0
    The good news is now I get a horizontal scroll bar! It still doesn't seem to be wide enough, but it sure seems a step in the right direction. It really seems close.

    As an outsider looking in, I would think it would be easier to do the horizontal scrolling when the width wasn't auto width? If the width was wider than the container, scroll?

    very cool work!
This discussion has been closed.