mohan
mohan

Reputation: 13165

How to avoid deselection of check box in extjs4.1

Can anybody tell me how to avoid deselection of check box in extjs4.1? In my application the check box should always be selected. The user shouldn't deselect the check box.

Upvotes: 1

Views: 100

Answers (1)

Akatum
Akatum

Reputation: 4016

You can use readOnly config property and configure your checkbox with readOnly: true. Value from this checkbox will be normally submited, but user can not uncheck the checkbox.

{
    xtype: 'checkbox',            
    boxLabel: 'Read only checkbox',
    name: 'readOnly',
    readOnly: true,
    checked: true

}

Upvotes: 2

Related Questions