extjs - Why itemTpl does not recognize the css class? -


i'm trying format each record retrieve server using class (carousel-squares) defined in css file. need each record appears inside thumbnail in view. however, when use inside div in itemtpl, nothing appears. why itemtpl not recognize class? if use class outside (in cls:) recognized.

the code have in dataview following:

      xtype: 'dataview',                                     store: {                                         autoload: true,                                         fields: ['title', 'description', 'state'],                                                                                proxy: {                                             type: 'ajax',                                             url: 'ws/idea/getbystate.php?title=&page=1',                                             reader: {                                                 type: 'xml',                                                 record: 'webidea',                                                 rootproperty: 'getbystateresult'     }                                         }                                     },                                     stylehtmlcontent: true,                                     cls: 'carousel-squares',                                     itemtpl: '<div class="carousel-squares"><h3>{title}</h3><p>{description}</p></div>',                                     flex: 1 

my css following:

.carousel-squares {     background-color: #fcfcfc;     border: 2px solid #99cb39;     width: 90%;     height: 30px;     margin: 20px 5px; } 


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -