Domanda

Ho un asp.net GridView che uso il tablesorter su:

  $(document).ready(function() {
     $("[id$='_myGridView']").tablesorter({ sortList: [[0, 0]] });
  }); 

Come posso applicare zebra striping che ri-strisce, quando ri-ordinamento?

Edit: Come @Chetan Sastry ha sottolineato, è semplice come:

  $(document).ready(function() {
     $("[id$='_myGridView']").tablesorter({ sortList: [[0, 0]], widgets: ['zebra'] });
  }); 
È stato utile?

Soluzione

Hai visto la zebra widget nella tablesorter plug-in? Questo dice che è parte del core plugin - http://tablesorter.com/docs/example-widgets. html

Altri suggerimenti

Sembra che .tablesorter() applica classi di odd e even sulle righe della tabella. La regola CSS dalla pagina web tablesorter è:

table.tablesorter tbody tr.odd td { background-color: #F0F0F6 }
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top