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

51467Re: Column background color changes after sorting

Expand Messages
  • bretlevy
    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...


      --- 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.
    • Show all 4 messages in this topic