[英]EXTJS 4.2 Paging toolbar formatissue
我已經使用了帶有分頁工具欄的ExtJs 4.2網格。分頁工具欄僅在Firefox中格式錯誤,但是在Chrome和IE中可以正確顯示。
該圖像與在ExtJS的分頁工具欄中顯示的格式錯誤
我已經包含了文件
<link href="../../ext-4.2.0.663/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script src="<%=ResolveUrl("~/ext-4.2.0.663/ext-all.js")%>" type="text/javascript"></script>
ExtJs代碼塊:
grid1 = new xg.GridPanel({
store: store,
// cm: cm1,
columns: [ <%= gridColumns %>],
loadMask: true,
layout: 'auto',
width: getGridWidth(),
renderTo: 'bdy',
viewConfig: {
//forceFit: false
onLoad: Ext.emptyFn,
preserveScrollOnRefresh: true,
scroll: 'both'
} ,
bbar: new Ext.PagingToolbar({
// pageSize: 10,//<<---does not required in ExtJs 4.2 as this property is no more found in Ext.PagingToolbar
id: "gridPaging",
store: (store),
displayInfo: true,
displayMsg: 'Displaying records {0} - {1} of {2}',
emptyMsg: "No records to display"
})
});
我已經在firefox中運行了示例代碼,它運行正常。 為什么要以(store)的形式提供store,請嘗試修復該store然后它可以工作。(順便說一句,我在Extjs 4.2.1中對其進行了測試)
這是示例代碼。
var store = Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{ 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" },
{ 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" },
{ 'name': 'Homer', "email":"home@simpsons.com", "phone":"555-222-1244" },
{ 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
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' }
],
height: 200,
width: 400,
bbar: new Ext.PagingToolbar({
id: "gridPaging",
store: store,
displayInfo: true,
displayMsg: 'Displaying records {0} - {1} of {2}',
emptyMsg: "No records to"
}),
renderTo: Ext.getBody()
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.