PDA

View Full Version : [solved]sorting issue in grid panel



Baron89
6 Sep 2012, 1:41 AM
hi all,in my item,there's no need to sort the columns,so i want to remove that 'triangle' which circled in the below pic.anybody know how to do?38500

sword-it
6 Sep 2012, 1:56 AM
Hi,

you can use sortable:false config to remove the sorting from columns:




sortable:false

willigogs
6 Sep 2012, 2:10 AM
You will also need to set enableHdMenu to false to remove the drop down menu:
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.GridPanel-cfg-enableHdMenu

(http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.GridPanel-cfg-enableHdMenu)However, if you are not utilizing the majority of the grid functionality, then you should probably use a List instead of a Grid :)

Baron89
6 Sep 2012, 4:03 AM
ahh,i think u r right,its not only to set sortable to false:) i will try it tmr.and i've never use list b4,thx for the advice

Baron89
6 Sep 2012, 4:06 AM
Hi,

you can use sortable:false config to remove the sorting from columns:



sortable:false

hi buddy,thx all the same,but i've set sortable as false,but there's still a drop down menu.i think #3 gives the soulation,i will try it tmr(not in the company currently,lol)

Baron89
6 Sep 2012, 4:58 PM
You will also need to set enableHdMenu to false to remove the drop down menu:
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.GridPanel-cfg-enableHdMenu

(http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.GridPanel-cfg-enableHdMenu)However, if you are not utilizing the majority of the grid functionality, then you should probably use a List instead of a Grid :)hi buddy,i've set enableHdMenu as false,but it still doesn't work,my code's like below
{
xtype: 'gridcolumn',
header: 'From',
dataIndex: 'from',
id: this.id + '.col.from',
autoWidth: true,
enableHdMenu : false
}

willigogs
7 Sep 2012, 12:40 AM
You need to add it to the grid config ;)