如何删除 extjs checkboxmodel 中的 checkall 选项?
如何删除检查所有选项是 extjs 4 checkboxmodel?
问候
How to remove check all option is extjs 4 checkboxmodel?
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
定义网格时(在 4.2.1 中),将此配置选项设置为:(
相关部分为
showHeaderCheckbox :false
)When defining a grid (in 4.2.1), set this config option to:
(The relevant part is
showHeaderCheckbox :false
)我已经设法使用纯 CSS 隐藏它:
代码:
I have managed to hide it using pure CSS:
Code:
创建
checkboxmodel
时,尝试在其配置中指定injectCheckbox: false
。 来自 API:When you're creating your
checkboxmodel
, try specifyinginjectCheckbox: false
into its configuration. From the API:使用 jquery 内部网格面板 afterrender 事件
Inside grid panel afterrender event using jquery
根据API,“header”属性的类型是String。也就是说,正确的值为''。它在 ExtJS 3.4 上对我有用
According to API, the type of "header" property is String. Said that, the correct value is ''. It has worked for me on ExtJS 3.4
配置中的 heder:false 或jectCheckBoxHeader = false 隐藏整个列。 CSS 解决方案是基于类的,因此使用相同选择模型的任何其他小部件也会隐藏整个检查。
heder:false in config or injectCheckBoxHeader = false hide the entire column. CSS solution is class based so any other widget using the same selection model would also hide the entire check.
在 ExtJS 4 中,可以提供如下标头配置,以在标头中显示空白或自定义文本。
In ExtJS 4 a header config can be provided as below to display a blank or custom text in the header.
我在 ExtJS 4.0.7 版本中遇到了这个问题。
首先,我删除了复选框布局:
然后我在网格的渲染后侦听器中使用了以下代码:
这不是一个好的解决方案,但可以用作起点。
I encountered this issue in ExtJS 4.0.7 version.
First I removed checkbox layout:
Then I used the following code in afterrender listener of the grid:
It is not a good solution but it can be used as a starting point.
感谢这里所有的好提示。
对于 Sencha 3.4,这是我最终使用的极其简单的纯 CSS,
My_Panel_With_a_Grid_Without_Header_CheckBox = Ext.extend(Ext.Panel, {....
cls: '内面板 hiddeGridCheckBoxOnSingleSelect',
....}
在我的 CCS 文件中:
.hiddeGridCheckBoxOnSingleSelect .x-grid3-hd-checker {
可见性:隐藏
}
Thanks for all the good hints here.
For Sencha 3.4, this is the extremely simple pure CSS I ended up using,
My_Panel_With_a_Grid_Without_Header_CheckBox = Ext.extend(Ext.Panel, {....
cls: 'innerpanel hiddeGridCheckBoxOnSingleSelect',
....}
in my CCS file:
.hiddeGridCheckBoxOnSingleSelect .x-grid3-hd-checker {
visibility:hidden
}
在 checkboxselectionModel 中定义 {Header: false}
Define {Header: false} in checkboxselectionModel