本文整理汇总了C#中OLVColumn.GetCheckState方法的典型用法代码示例。如果您正苦于以下问题:C# OLVColumn.GetCheckState方法的具体用法?C# OLVColumn.GetCheckState怎么用?C# OLVColumn.GetCheckState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OLVColumn
的用法示例。
在下文中一共展示了OLVColumn.GetCheckState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsSubItemChecked
/// <summary>
/// Is there a check at the check box at the given cell
/// </summary>
/// <param name="rowObject"></param>
/// <param name="column"></param>
public virtual bool IsSubItemChecked(object rowObject, OLVColumn column)
{
if (column != null && rowObject != null && column.CheckBoxes)
return (column.GetCheckState(rowObject) == CheckState.Checked);
else
return false;
}
示例2: ToggleSubItemCheckBox
/// <summary>
/// Toggle the check at the check box of the given cell
/// </summary>
/// <param name="rowObject"></param>
/// <param name="column"></param>
public virtual void ToggleSubItemCheckBox(object rowObject, OLVColumn column)
{
CheckState currentState = column.GetCheckState(rowObject);
CheckState newState = CalculateToggledCheckState(column, currentState);
SubItemCheckingEventArgs args = new SubItemCheckingEventArgs(column, this.ModelToItem(rowObject), column.Index, currentState, newState);
this.OnSubItemChecking(args);
if (args.Canceled)
return;
switch (args.NewValue) {
case CheckState.Checked:
this.CheckSubItem(rowObject, column);
break;
case CheckState.Indeterminate:
this.CheckIndeterminateSubItem(rowObject, column);
break;
case CheckState.Unchecked:
this.UncheckSubItem(rowObject, column);
break;
}
}
示例3: IsSubItemChecked
/// <summary>
/// Is there a check at the check box at the given cell
/// </summary>
/// <param name="rowObject"></param>
/// <param name="column"></param>
public virtual bool IsSubItemChecked(object rowObject, OLVColumn column) {
if (column == null || rowObject == null || !column.CheckBoxes)
return false;
return (column.GetCheckState(rowObject) == CheckState.Checked);
}