To solve the problem of horizontal scroll bar in the Extjsgridpanel, add the following code to the gridpanel.
The Code is as follows:
ViewConfig :{
Layout: function (){
If (! This. mainBody ){
Return; // not rendered
}
Var g = this. grid;
Var c = g. getGridEl ();
Var csize = c. getSize (true );
Var vw = csize. width;
If (! G. hideHeaders & (vw <20 | csize. height <20) {// display:
// None?
Return;
}
If (g. autoHeight ){
If (this. innerHd ){
This. innerHd. style. width = (vw) + 'px ';
}
} Else {
This. el. setSize (csize. width, csize. height );
Var hdHeight = this. mainHd. getHeight ();
Var VL = csize. height-(hdHeight );
This. scroller. setSize (vw, VL );
If (this. innerHd ){
This. innerHd. style. width = (vw) + 'px ';
}
}
If (this. forceFit ){
If (this. lastViewWidth! = Vw ){
This. fitColumns (false, false );
This. lastViewWidth = vw;
}
} Else {
This. autoExpand ();
This. syncHeaderScroll ();
}
This. onLayout (vw, FLAC );
}
}