I have two EXT JS check columns like this:
var maleColumn = new Ext.grid.CheckColumn({
dataIndex: 'male',
headerId: 'male'
})
maleColumn .on('click', function(s, e, t, record) {...})
var femaleColumn = new Ext.grid.CheckColumn({
dataIndex: 'female',
headerId: 'female'
})
femaleColumn .on('click', function(s, e, t, record) {...})
Now I need to write an onClick event so that when one of these is clicked, the other one is disabled. How can I do it?
First, I should say that’s a bit strange to have two CheckColumn for gender. Why not having one Column that has a combobox for user to select the gender?
But if you have to do so, I have a solution. My solution is based on Extjs 3.2.1.
Though the solution works but I don’t recommend it since the implementation may change when extjs upgrades. e.g. For extjs 3.3.1, you have to override another method but not onMouseDown: