Reputation: 7906
I have built component like below. Where i want to just display check box to user and when user double clicks the row, checkbox become editable. clicking the checkbox works fine, but when user unticks the checkbox render function check box does not get updates, it remains checked. How do i solve this issue? Any other way to simplify this requirement.
Ext.define('Abc.view.component.grid.RfColumn', {
extend: "Ext.grid.column.Column",
text: 'Rv.',
width: 40,
dataIndex: 'RF',
xtype: 'rFColumnGrid',
renderer: function(value) {
return "<input class='gridCheckbox' type='checkbox'" + ((value == 'Y') ? "checked='checked'" : "") + " disabled='disabled'>";
},
editor: {
xtype: 'checkboxEditor'
}
});
Ext.define('Abc.view.component.editor.CheckboxEditor', {
extend: 'Ext.form.field.Checkbox',
xtype: 'checkboxEditor',
inputValue : 'Y',
uncheckedValue: 'N'
});
Upvotes: 0
Views: 67
Reputation: 484
inputValue and uncheckedValue don't change what is returned by getValue(). Those are for form submissions. You can remove them and change your renderer to look for true/false.
renderer: function(value) {
return "<input class='gridCheckbox' type='checkbox'" + ((value == true) ? "checked='checked'" : "") + " disabled='disabled'>";
},
Upvotes: 0