PDA

View Full Version : How to do a delete , move up, move down functionality for a array grid row?



jaisonjames
26 Dec 2010, 10:31 PM
Delete , move up, move down functionality for a array grid row, code below.

var componentsconfig = new Ext.grid.GridPanel({
store: store,
columns: [
{id:'company',header: '<b>Component</b>', sortable: true},
{header: '<b>Display Name</b>', sortable: true},
{header: '<b>Size</b>', sortable: true},
{header: '<b>Filter</b>', sortable: true},
{header: '<b>Target</b>', sortable: true},
{header: '<b>Frequency</b>', sortable: true},
{header: '<b>From Date</b>', sortable: true},
{header: '<b>To Date</b>', sortable: true},
{header: '<b>Relative Dates</b>', sortable: true}
],
stripeRows: true,
autoExpandColumn: 'company',
height: 370,
width: '100%',
title: 'Component Configuration',
bbar:[
{xtype: 'tbfill'},
{
icon: '../image/reportui/icon-grid-deleteRow.png',
tooltip:'Delete Selected Row' ,

},
{
icon: '../image/reportui/icon-grid-moveup.png',
tooltip:'Move to Up Selected Row'

},
{
icon: '../image/reportui/icon-grid-movedown.png',
tooltip:'Move to Down Selected Row'

}
]
})

Thanks in advance for your help.

Condor
26 Dec 2010, 11:01 PM
You already found the solution (http://www.sencha.com/forum/showthread.php?48472-how-to-move-the-grid-s-row-up-and-down&p=230808#post230808).

aramaki
26 Dec 2010, 11:05 PM
moving: http://wwww.extjs.com/learn/Ext_FAQ_Grid#Disabling_column_move_for_particular_column
delete: http://dev.sencha.com/deploy/dev/examples/restful/restful.html
in principle it`s easy, but if you`ll have a prblems,write here

Condor
26 Dec 2010, 11:16 PM
The OP is talking about moving rows up/down in a grid, so your links are not relevant.

aramaki
26 Dec 2010, 11:31 PM
Ah,really,I`m sorry. As delete,this link relevant

jaisonjames
27 Dec 2010, 12:09 AM
Thank you aramaki (http://www.sencha.com/forum/member.php?206323-aramaki), delete functionality really working fine :)