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

Re: [ydn-javascript] Column background color changes after sorting

Expand Messages
  • Satyam
    When the DataTable starts piling up classNames it really gets hard to figure out which ones are active and how to override them. You are getting at the
    Message 1 of 4 , Sep 1, 2009
    • 0 Attachment
      When the DataTable starts piling up classNames it really gets hard to
      figure out which ones are active and how to override them. You are
      getting at the intersection of one style coming from the row and another
      one spreading from the column to each individual cell. Finding out the
      selector to override that is not trivial. See:

      http://www.satyam.com.ar/yui/widgetstyles.html

      Satyam

      shantek81 escribió:
      > Hi,
      >
      > New to yui. created a table that allows the columns to sort. added custom coloring to the rows and tableheader. the problem i'm having comes when i sort a column, the rows remain the customized color however all the cells in that particular sorted column defaults back to original color (the blueish color as seen in the examples). any suggestions? thanks.
      > i've tried customizing the column color itself using className in the columnDefs. this gives the column the correct background color i want but the same problem occurs when sorting that column.
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.409 / Virus Database: 270.13.72/2337 - Release Date: 08/31/09 05:50:00
      >
      >
    • bretlevy
      If you want to just set all the attributes of the table, try something like this AFTER the YUI css is loaded: .yui-skin-sam .yui-dt-scrollable .yui-dt-bd
      Message 2 of 4 , Sep 1, 2009
      • 0 Attachment
        If you want to just set all the attributes of the table, try something like this AFTER the YUI css is loaded:

        .yui-skin-sam .yui-dt-scrollable .yui-dt-bd {border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#666;}
        .yui-skin-sam tr.yui-dt-even { background-color:#333; color:#fff; } /* white */
        .yui-skin-sam tr.yui-dt-odd { background-color:#666; color:#fff; } /* light blue */
        .yui-skin-sam tr.yui-dt-even td.yui-dt-asc,
        .yui-skin-sam tr.yui-dt-even td.yui-dt-desc { background-color:#333; } /* light blue sorted */
        .yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,
        .yui-skin-sam tr.yui-dt-odd td.yui-dt-desc { background-color:#666; } /* dark blue sorted */

        Set the colors etc to your liking.

        Hope that helps...

        ~~bret



        --- In ydn-javascript@yahoogroups.com, "shantek81" <shantek81@...> wrote:
        >
        > Hi,
        >
        > New to yui. created a table that allows the columns to sort. added custom coloring to the rows and tableheader. the problem i'm having comes when i sort a column, the rows remain the customized color however all the cells in that particular sorted column defaults back to original color (the blueish color as seen in the examples). any suggestions? thanks.
        > i've tried customizing the column color itself using className in the columnDefs. this gives the column the correct background color i want but the same problem occurs when sorting that column.
        >
      • shantek81
        thx all for the help! datatable is as pretty as ever now!
        Message 3 of 4 , Sep 2, 2009
        • 0 Attachment
          thx all for the help! datatable is as pretty as ever now!

          --- In ydn-javascript@yahoogroups.com, "bretlevy" <bret@...> wrote:
          >
          >
          > If you want to just set all the attributes of the table, try something like this AFTER the YUI css is loaded:
          >
          > .yui-skin-sam .yui-dt-scrollable .yui-dt-bd {border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;background-color:#666;}
          > .yui-skin-sam tr.yui-dt-even { background-color:#333; color:#fff; } /* white */
          > .yui-skin-sam tr.yui-dt-odd { background-color:#666; color:#fff; } /* light blue */
          > .yui-skin-sam tr.yui-dt-even td.yui-dt-asc,
          > .yui-skin-sam tr.yui-dt-even td.yui-dt-desc { background-color:#333; } /* light blue sorted */
          > .yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,
          > .yui-skin-sam tr.yui-dt-odd td.yui-dt-desc { background-color:#666; } /* dark blue sorted */
          >
          > Set the colors etc to your liking.
          >
          > Hope that helps...
          >
          > ~~bret
          >
          >
          >
          > --- In ydn-javascript@yahoogroups.com, "shantek81" <shantek81@> wrote:
          > >
          > > Hi,
          > >
          > > New to yui. created a table that allows the columns to sort. added custom coloring to the rows and tableheader. the problem i'm having comes when i sort a column, the rows remain the customized color however all the cells in that particular sorted column defaults back to original color (the blueish color as seen in the examples). any suggestions? thanks.
          > > i've tried customizing the column color itself using className in the columnDefs. this gives the column the correct background color i want but the same problem occurs when sorting that column.
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.