I'm still disable solve previous problem : HIDE UNWANTED CHECKBOXES (on specific condition eg: field "mobile" empty)
I've found at post:
https://extjs.net/forum/showthread.php?p=267945
this explain:
[..]
Disabling the checkbox is not supported with the current code. The checkboxes are rendered using CSS and images, not a true HTML input element. It would be possible to override the render methods in CheckColumnConfig to provide disabled support.
[..]
I've tryied also this solution without success.
This is my simplified code:
Code:
Ext.onReady(function(){
var myData = [
[ 'Albert Einstein', '05411799999', '333333333' ],
[ 'Albertino Einstein', '', '333334444' ],
[ 'Alberta Einstein', '05411799997', '' ]
];
Ext.QuickTips.init();
var fm = Ext.form;
var sm = new Ext.grid.CheckboxSelectionModel({
renderer: foo
});
function foo()
{
return '<div class="x-grid3-row-checker"> </div>';
}
var cm = new Ext.grid.ColumnModel([
{ id:'fullname', header: "Full Name", dataIndex: 'fullname', width: 220 },
{ header: "Telephone", dataIndex: 'tel', width: 120 },
{ header: "Mobile", dataIndex: 'cell', width: 120 },
sm
]);
var store = new Ext.data.SimpleStore({
fields: [
{name: 'fullname'},
{name: 'tel'},
{name: 'cell'}
]
});
var grid = new Ext.grid.EditorGridPanel({
store: store,
cm: cm,
renderTo: 'editor-grid',
width:600,
height:300,
title:'Genius Family',
frame:true,
sm: sm
});
store.loadData(myData);
});
I miss piece of how interface checking data with renderer:
"If EMPTY record.data.cell THEN return ' ' " ...
Thanks in advice.
Alberto.