PDA

View Full Version : I don't see a horizontal scroll bar on the Grid panel when I resize the columns.



gauravk
19 May 2009, 1:58 AM
I don't see a horizontal scroll bar on the Grid panel when I resize the columns.
Snippets of my code are :

var adminBlkLstSM = getSelectionModel('checkbox');

var cm = new AdminGui.xg.ColumnModel([
adminBlkLstSM,
{id:'AB1',header: CW.adminblacklistgrid.site, width: 280, sortable: true, dataIndex: 'domain',renderer: renderSite,menuDisabled:true,resizable:true, editor: new Ext.form.TextField({allowBlank: false,vtype: 'site'}) }
,{id:'AB2',header: CW.adminblacklistgrid.comments, width: 140, sortable: true, align:'left', dataIndex: 'comment',menuDisabled:true,resizable:true, editor: new Ext.form.TextField({allowBlank: true, vtype: 'commentsDesc'}) }
,{id:'AB3',header: CW.adminblacklistgrid.updatedby, width: 140, sortable: true, align:'left', dataIndex: 'updateBy',menuDisabled:true,resizable:true }
,{id:'AB4',header: CW.adminblacklistgrid.updatedon, width: 140, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s '),menuDisabled:true,resizable:true, dataIndex: 'lastUpdated'}
,{id:'AB5',header: CW.adminblacklistgrid.reportedinappropriate, width: 140, sortable: true, align:'left', dataIndex: 'markedInappropriate',renderer:renderAppr,menuDisabled:true,resizable:true}
,{id:'AB6',header: "", width: 200, sortable: false, align:'center', dataIndex: 'flag', renderer:renderAdminBlacklstRowBtns, menuDisabled:true,resizable:true}
,{id:'AB7',header: "", width: 20, sortable: false, align:'center',menuDisabled:true,resizable:true}]);


/*Create editable data grid*/
AdminGui.grid = getEditableDataGrid('grid', CW.adminblacklistgrid.title, cm, adminBlkLstSM, adminBlackLststore, 'List_AdminBlackMF.htm');

function getEditableDataGrid(id, title, colModel, sm, store, helpPage){
return new Ext.grid.EditorGridPanel({
id: id,
ds: store,
title: getTitleWithHelp(title,helpPage),
cm: colModel,
autoScroll : true,
sm: sm,
enableColumnMove:false,
clicksToEdit: 1,
tbar: getPaginationToolBar(store),
buttonAlign:'right',
width:1110,
frame:true,
stripeRows: true,
style:'padding:10px',
autoHeight: true
});
}

AdminGui.grid.render('list');

When I resize a column I don't see a horizontal scroll bar. Please Help!!!

19 May 2009, 5:49 AM
it's a 'feature' with autoHeight: true remove that and you're OK.

gauravk
19 May 2009, 9:48 PM
got it!!!

Thanks