1
Ext JS를 사용하여 그리드를 만들고 있습니다. 그리드의 행 수가 증가하면 그리드 패널의 높이를 자동으로 증가시켜야합니다. 이 속성을 구현하기 위해 Ext JS 그리드의 어떤 속성을 설정할 수 있습니까?Ext JS 그리드 패널 높이 속성
Ext JS를 사용하여 그리드를 만들고 있습니다. 그리드의 행 수가 증가하면 그리드 패널의 높이를 자동으로 증가시켜야합니다. 이 속성을 구현하기 위해 Ext JS 그리드의 어떤 속성을 설정할 수 있습니까?Ext JS 그리드 패널 높이 속성
높이 속성에 값을 지정하지 않으면 그게 전부입니다.
여기를보십시오 :
Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{ 'name': 'Lisa', "email":"[email protected]", "phone":"555-111-1224" },
{ 'name': 'Bart', "email":"[email protected]", "phone":"555-222-1234" },
{ 'name': 'Homer', "email":"[email protected]", "phone":"555-222-1244" },
{ 'name': 'Marge', "email":"[email protected]", "phone":"555-222-1254" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
// Don't specify the height when creating the grid
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
width: 400,
renderTo: Ext.getBody()
});
https://fiddle.sencha.com/#fiddle/bnl가 ncardeli 주셔서 감사합니다. 알았어 – PrasanthTR
@PrasanthTR이 사이트가 작동하는 방식에 관한 귀하의 질문에 대답한다면,이 답변을 "받아 들일"수 있습니다. 자세한 내용은 http://stackoverflow.com/help/someone-answers를 참조하십시오. – ncardeli