Loading ...
Sorry, an error occurred while loading the content.
 

DataTable - nowrap

Expand Messages
  • jimsearle
    I was able to turn off wrapping in my datatable cells, but when I did that I assumed the column widths would expand to fit the data in the column but it
    Message 1 of 3 , Feb 29, 2008
      I was able to turn off wrapping in my datatable cells, but when I did
      that I assumed the column widths would expand to fit the data in the
      column but it doesn't. I'm turning of wrapping with by setting the
      formatter to:

      myDataSource.formatNoWrap = function(elCell, oRecord, oColumn, sData) {
      YAHOO.util.Dom.setStyle(elCell,'white-space','nowrap');
      elCell.innerHTML = sData;
      }

      Any help would be appreciated, I'm a CSS novice...

      Thanks,
      Jim
    • jimsearle
      Sorry, I forgot to mention that the column I m setting nowrap on is the farthest column on the right, so the datatable is forcing that columns width to be
      Message 2 of 3 , Feb 29, 2008
        Sorry, I forgot to mention that the column I'm setting nowrap on is
        the farthest column on the right, so the datatable is forcing that
        columns width to be small enough so the table fits in the browser
        window. But, I would like the column width to be set to auto-fit the
        largest element.

        --- In ydn-javascript@yahoogroups.com, "jimsearle" <jimsearle@...> wrote:
        >
        >
        > I was able to turn off wrapping in my datatable cells, but when I did
        > that I assumed the column widths would expand to fit the data in the
        > column but it doesn't. I'm turning of wrapping with by setting the
        > formatter to:
        >
        > myDataSource.formatNoWrap = function(elCell, oRecord, oColumn, sData) {
        > YAHOO.util.Dom.setStyle(elCell,'white-space','nowrap');
        > elCell.innerHTML = sData;
        > }
        >
        > Any help would be appreciated, I'm a CSS novice...
        >
        > Thanks,
        > Jim
        >
      • jimsearle
        The problems mentioned below happen in firefox 2.x. In IE 7 it actually works like I want. So how do I get firefox to behave the same way? ... sData) {
        Message 3 of 3 , Feb 29, 2008
          The problems mentioned below happen in firefox 2.x. In IE 7 it
          actually works like I want. So how do I get firefox to behave the
          same way?

          --- In ydn-javascript@yahoogroups.com, "jimsearle" <jimsearle@...> wrote:
          >
          >
          > Sorry, I forgot to mention that the column I'm setting nowrap on is
          > the farthest column on the right, so the datatable is forcing that
          > columns width to be small enough so the table fits in the browser
          > window. But, I would like the column width to be set to auto-fit the
          > largest element.
          >
          > --- In ydn-javascript@yahoogroups.com, "jimsearle" <jimsearle@> wrote:
          > >
          > >
          > > I was able to turn off wrapping in my datatable cells, but when I did
          > > that I assumed the column widths would expand to fit the data in the
          > > column but it doesn't. I'm turning of wrapping with by setting the
          > > formatter to:
          > >
          > > myDataSource.formatNoWrap = function(elCell, oRecord, oColumn,
          sData) {
          > > YAHOO.util.Dom.setStyle(elCell,'white-space','nowrap');
          > > elCell.innerHTML = sData;
          > > }
          > >
          > > Any help would be appreciated, I'm a CSS novice...
          > >
          > > Thanks,
          > > Jim
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.