PDA

View Full Version : According to record setting visivility of some rowActionButtons



jorgeluislay
10 Oct 2012, 1:07 PM
Im trying to change the visibility of some rowAtions i habe in my grid but i cant to this.

My record has different state ( "NEW" or "DELETED" or "SOMETHING ELSE") and according to this state from the response i want to show rowactions in the singel line in a grid.

State: --------------------------- Name: ------------------ ACTIONS:

'NEW' -------------------------- jorge ----------- |Action(1) | Action(2) | Action(3) |
'DELETED'-------------------- jorge-------------|Action(1) |-------------| Action(3) |
'SOMETHING ELSE' -------- jorge ------------|------------ | Action(2) |------------ |

how can i do this ?? (this is a grid.. with the actions i want to show.. )

jorgeluislay
13 Oct 2012, 1:41 AM
So i didnt find a solution for this problem yet.

Grid plus Buttons. Would be that a soulution ?

With:

if (record.state == "NEW"){
Ext.getCmp("buttonSateNew").button().enable();
Ext.getCmp("buttonSateDeleted").button().disnable();
}
else if (record.state == "DELETED"){
Ext.getCmp("buttonSateNew").button().disnable();
Ext.getCmp("buttonSateDeleted").button().ennable();
}
else {
Ext.getCmp("buttonSateNew").button().disnable();
Ext.getCmp("buttonSateDeleted").button().disnable();
}

or another solution maybe ? i want it with saski rowaction buttons.

jorgeluislay
13 Oct 2012, 7:39 AM
I almost got it. This example works for me very good doing a dynamicly grid depending on the store:

http://www.rahulsingla.com/blog/2011/01/extjs-components-in-gridpanel-columns

When i put some more buttons, than i dont get them one after another.

Someone expiriancing this issue ?