作用于不确定的复选框checkstate [英] Acting on an indeterminate checkbox checkstate

查看:95
本文介绍了作用于不确定的复选框checkstate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置搜索,我希望用户能够基于表中布尔值列的特定状态来决定是否要查看结果,还是忽略它并检索所有行而与布尔值无关状态. (我希望这是有道理的)

本质上,我希望用户能够将复选框设置为选中,未选中或不确定,并使我的程序在这三个状态中的任何一个上起作用.是否可以捕获不确定的检查状态?如果是这样,怎么办?据我所知,checked和indeterminate都返回一个真实的检查值,因此我不能使用null,也没有checkstate的不确定值.

帮助! (预先感谢!非常感谢您的帮助或建议!)

I''m setting up a search and I want the user to be able to decide if they want to see results based on a particular state of a boolean column in the table or ignore it and retrieve all rows regardless of the boolean state. (I hope that makes sense)

Essentially I want the user to be able to set a checkbox as checked, unchecked, or indeterminate and have my program act on any three of these states. Is it possible to catch an indeterminate checkstate? If so, how? As far as I can tell, both checked and indeterminate return a true checked value, so I can''t use null, and there is no checkstate value for indeterminate.

Help! (Thanks in advance! Any help or advice would be tremendously appreciated!)

推荐答案

检查CheckState属性(不要双关语!).

Check the CheckState property (no pun intended!).


这篇关于作用于不确定的复选框checkstate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆