Skip to content

Instantly share code, notes, and snippets.

@tayfunoziserikan
Created April 3, 2012 09:24
Show Gist options
  • Save tayfunoziserikan/2290636 to your computer and use it in GitHub Desktop.
Save tayfunoziserikan/2290636 to your computer and use it in GitHub Desktop.
Ext JS 3 GridPanel GridView getRowClass kullanım örneği
// this == GridPanel
// Bu alandan gridin view sınıfına ulaşıp
// getRowClass methodunu overwrite ediyoruz.
// Method her calıstıgında record ve index parametreleri geçilir.
// Burada bir css sınıfı donduruyorusnuz ve grid o sınıfı row'larına ekliyor.
// O sınıfta da ıstedıgıniz renklendirmeler yapılır
this.getView().getRowClass = function(record, index) {
var active = record.get('active'); // burada ılgılı kaydın içeriğine ulaşılır
if (!active) { // burada record ile ilgili logic işlemler yapılır.
return 'passive-products'; // CSS sınıfı geri döndürülür
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment