내선 JS GridPanel 컬럼 폭을 확장하고,이 닮은 GridPanel 가지고I는 내선 JS 2.3.0을 사용
는 I 열의 폭을 확장하려는을 이러한 스크롤 바는 갔는지 패널의 가장 오른쪽에 배치하여 스크롤 막대의 오른쪽 빈 공간을 제거합니다.
관련 코드
는 다음과 같습니다 :var colModel = new Ext.grid.ColumnModel([
{
id: 'name',
header: locale['dialogSearch.column.name'],
sortable: true,
dataIndex: 'name'
}
]);
var selModel = new Ext.grid.RowSelectionModel({singleSelect: false});
this._searchResultsPanel = new Ext.grid.GridPanel({
title: locale['dialogSearch.results.name'],
height: 400,
layout: 'fit',
stripeRows: true,
autoExpandColumn: 'name',
store: this._searchResultsStore,
view: new Ext.grid.GridView(),
colModel: colModel,
selModel: selModel,
hidden: true,
buttonAlign: 'center',
buttons: [
{
text: locale["dialogSearch.button.add"],
width: 50,
handler: function() {
}
},
{
text: locale["dialogSearch.button.cancel"],
width: 50,
handler: function() {
entitySearchWindow.close();
}
}
]
});
내 첫 번째 생각은 같았지 만 코드를 보면 , 그리드 실제로 버튼과 제목을 포함하므로 그리드는 실제로 정확한 크기입니다, 문제가되는 열입니다 – nscrob
'layout'과'height' 속성을 제거하려 했습니까? –
윈도우가 렌더 된 후 그리드를 추가합니까? 그렇다면, 컴포넌트를 추가 한 후'win.doLayout()'을 수행하십시오. –