PDA

View Full Version : How to implement delete in extjs grid



aayush_V20
18 May 2015, 2:26 AM
Hi,
I have a grid with just one column. I need to implement a delete feature where in when the user has selected a row and then presses on delete button, which is present in the header of the grid, that particular selected row is deleted. The selType is a checkbox. Kindly advise me as to how do I implement this. Also the sort order is not important.

yeghikyan
18 May 2015, 4:16 AM
n0c

aayush_V20
18 May 2015, 6:04 AM
Thanks for the above answer. That helped a lot. Just one small follow up. If I wished to have two buttons then how do I make sure one is aligned to the left and the other aligned to the right?

Scorpie
18 May 2015, 6:15 AM
Thanks for the above answer. That helped a lot. Just one small follow up. If I wished to have two buttons then how do I make sure one is aligned to the left and the other aligned to the right?

https://fiddle.sencha.com/#fiddle/n0s

yeghikyan
18 May 2015, 6:19 AM
{
xtype: 'toolbar',
items: [{
text: "Button Left"
},'->', {
text: "Button Right"
}]
}

aayush_V20
18 May 2015, 10:50 PM
I think I should have mentioned that I am using ExtJS 4.0 because when I put the '->' issues start arising. Does this work in version 4?

Scorpie
18 May 2015, 11:55 PM
Yes, '->' has been around since 2.x I believe :DPlease provide a fiddle so we can take a look

yeghikyan
19 May 2015, 2:04 AM
Right, in 4.0 it is a little bit abgekackt
n0c