Created
April 3, 2012 09:24
-
-
Save tayfunoziserikan/2290636 to your computer and use it in GitHub Desktop.
Ext JS 3 GridPanel GridView getRowClass kullanım örneği
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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