extjs - How to change the font size and color of list items in sencha touch -


i have sample application binding store data list using itemtpl, have little confusion on how change color , size of first 2 list items when dynamically binding data list store.

this sample code :

ext.define('sample.view.searchresultview', {     extend: 'ext.panel',     requires: [         'ext.list',         'ext.form.fieldset',         'ext.field.text',        'ext.toolbar',        'ext.titlebar'     ],      alias: "widget.searchresultpage",       config: {         scrollable: true,         items: [                {                   xtype: 'list',                   layout:'fit',                   height:500,                   title: 'search results',                   store: 'mysearchstore',                  itemtpl: '<table><td><tr height=10%>{blockno}</tr><tr height=90%><p>{shortdescription}</p></tr></td></table>'                                                 )               }         ]     },    });  

you need add cls attributes list :

cls:'mylist' 

and add in css file :

.mylist .x-list-item:nth-child(1), .mylist .x-list-item:nth-child(2) {   color: #ccc;   font-size:14px; } 

hope helps


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -