⑴ EXT Grid的橫向滾動條不顯示!
很久沒用Ext了,也抄沒法測試效果。我感覺是因為設置了 width:600, 然後forceFit:true的話,會自動在600的寬度內重新計算每列的列寬比例,這么一來就沒滾動條了,而是通過壓縮每列列寬展示在600的范圍內。
你去了forceFit:true試試。
⑵ extjs gridpanel 在列很多的情況下,我把滾動條拖到右邊單擊行時如何能不讓滾動條自動跑到左邊,
增加focusRow :Ext.emptyFn 函數,用過了,很靈的,滾動條果然不亂跑了;
希望更多的有這個問題的版人權能夠看到;
new Ext.grid.GridPanel({
viewConfig : {
focusRow : Ext.emptyFn
}
});
⑶ Extjs(3.0)中grid的滾動條,兩個gridpanel,拉動其中一個gridpanel的滾動條,另外一個滾動條也會跟著聯動
Ext渲染到界面上都是解析成html代碼的,你用火狐firebug找到頁面中存放滾動條的回div,
var obj=Ext.get('div_id');
obj.on('scroll',functionName);//綁定答滾動事件
function functionName(){
//do something
}
⑷ extjs EditorGridPanel滾動條顯示不出來。
將EditorGridPanel的autoScroll屬性設置為true,應該就可以了
⑸ extjs中grid滾動條怎麼加
var userGrid = new Ext.grid.GridPanel({
frame:true,
loadMask:true,
tbar:toolbar,
store:userStore,
stripeRows:true,
viewConfig:{
autoFill:true
//forceFit:true
},
。。。。。。
});
new Ext.Viewport({
layout:'border',
items:[{
contentEl:'toptitle',
bodystyle:'background-color:#BBCCEE;',
region:'north',
height:134
},{
//contentEl:'usergrid-div',
region:'center',
layout: 'fit',
border:true,
items:[userGrid]
}]
});
-------------------------------
var grid = new Ext.grid.GridPanel({
2 autoHeight: true,
3 autoWidth:true,
4 autoScroll: true,
5 title: '<spanstyle=font-weight:bolder;line-height:25px;font-size:18px;><center>「大劑量堵水」措施不同井類型對比表</center></span>',
6 loadMask: true,
7 renderTo: 'grid',
8 store: store,
9 cm: cm,
10 collapsible: true,
11 bbar: new Ext.PagingToolbar({
12 pageSize: 100,
13 store: store,
14 displayInfo: true,
15 displayMsg: '顯示第{0}條到第{1}條記錄,一共{2}條',
16 emptyMsg: '沒有記錄'
17 })
18 });
19
20 });
21 </script>
22 </head>
23 <bodystyle=" text-align:center;">
24 <divid="Contain" style="text-align:left;width:1000px;">
25 <divid="grid" style="width:1000px;"></div>
26 </div>
27 </body>
autoHeight: true,autoWidth:true這兩個屬性是不起作用的。這里要Ext的Grid的滾定條必須顯示出來就必須設置固定的Grid寬度(以像素為單位)。
Grid中你加入 width: Ext.get("content").getWidth(), height: Ext.get("content").getHeight()然後再看下你的效果。
如果這個實例你能運行,但是你機器上的代碼不能運行,可否提供一個Ext的版本號,以供來測試解決這個問題。
這個問題已經解決了,解決方法是把autoHeight: true, autoWidth:true,改成具體的數值就行了。
Ext的Grid寬高必須是給定的明確數值的。
------------------
var grid = new Ext.grid.GridPanel( {
renderTo : 'Container',
width : gridWidth,
stripeRows : true,
enableHdMenu:false,
autoScroll : true,
autoHeight : true,
columnLines : true,
store : new Ext.data.ArrayStore( {
fields : fields,
data : gridData
}),
columns : columns,
viewConfig : {
forceFit : true
}
});
⑹ extjs gridpanel設置哪項(autoheight:true)時,實現橫向滾動條
GridPanel 里的 column 每個都設置 width ,且總和大於 gridpanel 的 width 時橫向滾動條自動會顯示。但是必須載入數據後才會顯示滾動條。
⑺ extjs3.4 gridpanel的滾動條沒出來 排個序又出來了 這是怎麼回事
gridpanel裡面加入autoScroll: true, 配置項,
第一次載入完沒有出現滾動條,可以在store,load裡面加入內callback配置項,重容新排序就行
store.load({
callback:function(){store.sort("F_PROJECT_STAGE", "ASC");}
});
⑻ EXT如何讓兩個grid的滾動條實現聯動,當拖動一個grid的時候另一個grid的滾動條也跟真滾動
lz奇思妙想,果斷佩服,不過grid自帶展開組件擴展為,grid展開行里包含grid,倒是可以解決你這個問題,不過嗎,展開組件有不可避免的矛盾,所以無解
⑼ 怎麼改變ext.grid.gridview 的滾動條屬性
scrollFlags
x : Boolean
true if this Component is scrollable horizontally - style setting may be 'auto' or 'scroll'.
y : Boolean
true if this Component is scrollable vertically - style setting may be 'auto' or 'scroll'.
both : Boolean
true if this Component is scrollable both horizontally and vertically.
overflowX : String
The overflow-x style setting, 'auto' or 'scroll' or ''.
overflowY : String
The overflow-y style setting, 'auto' or 'scroll' or ''.
scrollBy( deltaX, deltaY, animate )
⑽ extjs4 裡面怎麼監聽滾動條
設置scrollable:true.
如果內容超過panel的寬度、高度就會出現滾動條
scrollable : Boolean/String/Object
Configuration options to make this Component scrollable. Acceptable values are:
true to enable auto scrolling.
false (or null) to disable scrolling - this is the default.
x or horizontal to enable horizontal scrolling only
y or vertical to enable vertical scrolling only
Also accepts a configuration object for a Ext.scroll.Scroller if if advanced configuration is needed.
The getter for this config returns the Scroller instance. You can use the Scroller API to read or manipulate the scroll position: