52,797
社区成员
发帖
与我相关
我的任务
分享
viewConfig 这里面的配置其实应用到
Ext.grid.GridView
当你设置forceFit:ture
或者默认时候, GridView会对column进行处理的
viewConfig : Object
A config object that will be applied to the grid's UI view. Any of the config options available for Ext.grid.GridView can be specified here. This option is ignored if view is specified.
Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
<div id="method-Ext.grid.GridView-getRowClass"></div>/**
* Override this function to apply custom CSS classes to rows during rendering. You can also supply custom
* parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b>
* parameter. This function should return the CSS class name (or empty string '' for none) that will be added
* to the row's wrapping div. To apply multiple class names, simply return them space-delimited within the string
* (e.g., 'my-class another-class'). Example usage:
<pre><code>
viewConfig: {
forceFit: true,
showPreview: true, // custom property
enableRowBody: true, // required to create a second, full-width row to show expanded Record data
getRowClass: function(record, rowIndex, rp, ds){ // rp = rowParams
if(this.showPreview){
rp.body = '<p>'+record.data.excerpt+'</p>';
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
},