码迷,mamicode.com
首页 > 其他好文 > 详细

ext grid添加横向滚动条

时间:2014-08-14 19:25:59      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:style   io   for   ar   cti   div   amp   ef   

Ext.override(Ext.grid.GridView, { 
                renderBody : function() { 
                    var markup = this.renderRows(); 
                    if (markup == "") 
                        markup = "<div style=‘width:" + this.getTotalWidth() 
                                + "‘> </div>";  
                    return this.templates.body.apply({ 
                                rows : markup 
                            }); 
                } 
            });
Ext.override(Ext.grid.GroupingView, { 
                updateGroupWidths : function() { 
                    if (!this.enableGrouping || !this.hasRows()) { 
                        return; 
                    } 
                    var tw = Math.max(this.cm.getTotalWidth(), 
                            this.el.dom.offsetWidth - this.scrollOffset) 
                            + ‘px‘; 
                    var gs = this.getGroups(); 
                    for (var i = 0, len = gs.length; i < len; i++) { 
                        if (gs[i] != undefined && gs[i].firstChild != undefined 
                                && gs[i].firstChild.style != undefined)  
                            gs[i].firstChild.style.width = tw; 
                    } 
                } 
            });

ext grid添加横向滚动条,布布扣,bubuko.com

ext grid添加横向滚动条

标签:style   io   for   ar   cti   div   amp   ef   

原文地址:http://www.cnblogs.com/mxw272618/p/3912768.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!