2012-07-05 41 views

回答

1

定義自定義類列表,並添加CSS在你的CSS文件中類。 超越課程,如果您使用商店並添加所需的字段名進行分組,則將分組配置選項設置爲true。

查看:

Ext.define('app.view.Temp', { 
     extend : 'Ext.List', 
     xtype : 'temp', 

     config : { 
      title : 'Temp', 
      cls : 'x-contacts', 
      disableSelection: true, 
      grouped : true, 
      store : 'YourStore', 
      ui : 'round', 
      cls:'modifiedHeader', 
      //custom css classname 
      itemTpl : ['<span>{field_name}</span>'].join('') 
     } 
    }); 

商店:

Ext.define('app.store.YourStore', { 
     extend : 'Ext.data.Store', 

     config : { 
      model : 'app.model.Temp', 
      autoLoad : true, 
      storeId:'YourStore', 
      groupField: 'field_name', 

      proxy : { 
       type : 'ajax', 
       url : 'link/to/api' 
      } 
     } 
    }); 

app.css

.modifiedHeader .x-list-header { 
//your desired css here 
display:none;//If you want to hide the header 
}