PDA

View Full Version : Not editable checkcolumn



xpouj04
23 Mar 2012, 7:24 AM
Hi,


I would like to use checkcolumn which would be not-editable,
so I wrote a custom renderer:



var checkcolumnDisabled = function(value, metaData, record, row, col, store, gridView) {
str = '<input type="checkbox" disabled="disabled"' + (value ? 'checked="checked"' : "") + '>';
return str
};


This works but a bit strangely - I cannot change the checkbox by clicking directly on it, but if I click in the cell outside the checkbox the checkbox toggles.
How to solve it?


Thanks,
Jan

mitchellsimoens
23 Mar 2012, 11:53 AM
The checkcolumn and checkbox selection model all use a checkbox image not an actual checkbox. You can use a checkbox column and prevent the checking of it with a mousedown or keydown event listener.

khmurach
24 Mar 2012, 4:34 PM
Try this demo http://ext4all.com/post/extjs-4-readonly-checkbox-column

EPV
26 Feb 2013, 1:48 PM
We also have the booleancolumn ...



{
xtype: 'booleancolumn',
header : "Checked?",
align : 'center',
dataIndex : 'checked',
trueText: '?',
falseText: ''
}


Good luck!