ExtJS4 new discover_checkboxselectionmodel radio selection and selection restrictions
Source: Internet
Author: User
When doing extjsgrid, we often use the Checkbox to determine the selected row. In extjsgrid, Checkbox can also be implemented. In Extgrid, The CheckboxSelectionModel object class is used to display the Checkbox. Code: [javascript] // -------... Syn when we do extjs grid, we often use Checkbox to determine the selected row. In extjs grid, we can also implement Checkbox.
In Ext grid, the CheckboxSelectionModel object class is used to display the Checkbox.
Code:
[Javascript]
// ------------------------------------------------------ Select the column Mode
Var sm = new Ext. grid. CheckboxSelectionModel ({
DataIndex: "ID ",
}); Www.2cto.com
By default, Checkbox is the check box.
But what should we do if we need to select one option?
In fact, it is very easy to set the singleSelect attribute to true.
It is set to false by default, so it is a check.
Single-choice code:
[Javascript]
Var sm = new Ext. grid. CheckboxSelectionModel ({
DataIndex: "ID ",
SingleSelect: true
});
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service