PDA

View Full Version : How i can hide the actioncolumn in Grid



psmacarov
25 Mar 2011, 3:03 AM
I used actioncolumn in my grid, but i don't want to display actioncolumn for each row of the grid.
Please help, how i can hide actioncolumn for some rows in my grid.
In Example don't display icon and tooltip and disable action, or probably it solved more simply ?

mcadirci
25 Mar 2011, 3:28 AM
Which example are you talking about?

psmacarov
25 Mar 2011, 4:27 AM
sorry, not "in Example" :))) "at Example"
I only suggested a way how to do it, but I do not know how

mcadirci
25 Mar 2011, 4:39 AM
Do you have a column named action or actioncolumn is some kind of extension?

psmacarov
25 Mar 2011, 4:46 AM
Part of my code



{
header : "<h5 align = 'center'>?????</h5>",
//dataIndex : 'field8',
width : 100,
align : 'right',
sortable: true
},
{
xtype: 'actioncolumn',
width: 30,
items: [
{
icon: '../client/ext/resources/icons/fam/kfm.png',
tooltip : '???????',
handler: function(grid, rowIndex, colIndex)
{


}
}
]
}

mcadirci
25 Mar 2011, 6:17 AM
.img.someCss {
background-image: url("someImg");
height: 16px;
width: 16px;


}

.img.emptyCss{ height: 0px;
width: 0px;

}






{
getClass: function(v, meta, rec) { // Or return a class from a function
if ( someCondition ) {
return 'someCss';
} else {
return 'emptyCss';
}
},
handler: function(grid, rowIndex, colIndex) {
doSmt();
}Does getClass function not working?

psmacarov
27 Mar 2011, 2:34 AM
Not working (( no image is displayed


.someCss {
background-image: url(../client/ext/resources/icons/fam/kfm.png);
height: 16px;
width: 16px;


}




{
getClass: function(v, meta, rec) { // Or return a class from a function

return 'someCss';

}
,
handler: function(grid, rowIndex, colIndex)
{
}

mcadirci
27 Mar 2011, 12:05 PM
Hello again,

I am not sure about what you mean with hiding the action column.

psmacarov
27 Mar 2011, 8:11 PM
Sorry, again I find my mistake, getClass is exatly what i need, thank's a lot mcadirci.