GXT Treepanel 复选框级联无法从叶子向上工作
我正在使用带有复选框的 GXT TreePanel,并注意到似乎没有办法配置它,以便检查状态正确地从叶子级联到父节点...示例:
foo bar baz Initial state: nothing checked. Input: check bar, then baz. Expected result: foo gets checked to reflect that all its child nodes are checked. Actual result: foo remains unchecked.
I am using a GXT TreePanel with checkboxes and have noticed that there does not seem to be a way to configure it so that check state properly cascades UP from leaves to parent nodes...example:
foo bar baz Initial state: nothing checked. Input: check bar, then baz. Expected result: foo gets checked to reflect that all its child nodes are checked. Actual result: foo remains unchecked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以手动检查是否检查了所有子项,然后再次手动相应地设置其父项的状态。代码会是这样的:
You can manually check if all children are checked and then, again manually, set their parent's state accordinaly. The code would be something like this:
使用 setCheckStyle(CheckCascade.CHILDREN); 方法。
它会帮助你。
use
setCheckStyle(CheckCascade.CHILDREN);
method.it will help you.