简体   繁体   English

以编程方式获取SPList中复选框的值

[英]Programmatically getting the value of the checkboxes in a SPList

Does anyone know how to get the value of the checkboxes associate for each row in a SPList? 有谁知道如何获取SPList中每行的复选框的值? The checkbox I am refering to are the one that you can enable in tabular view. 我所指的复选框是您可以在表格视图中启用的复选框。

I cannot seem to find any references to access the checkbox within the following classes: 我似乎无法找到任何引用访问以下类中的复选框:

SPListItem SPListItemCollection SPView SPList SPListItem SPListItemCollection SPView SPList

Any help would be appreciated. 任何帮助,将不胜感激。 thanks 谢谢

try : 尝试:

SPListItem listItem = // retrieve your list ;


var YourStringValue = listItem["YourYesNoField"].ToString().ToLower();

Return "true" or "false" string values 返回“true”或“false”字符串值

OR 要么

var YourBooleanValue = (bool)listItem["YourYesNoField"];

Return True or False boolean values 返回True或False布尔值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM