本文整理汇总了C#中OLVColumn.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# OLVColumn.GetValue方法的具体用法?C# OLVColumn.GetValue怎么用?C# OLVColumn.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OLVColumn
的用法示例。
在下文中一共展示了OLVColumn.GetValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetFirstNonNullValue
/// <summary>
/// Get the first non-null value of the given column.
/// At most 1000 rows will be considered.
/// </summary>
/// <param name="column"></param>
/// <returns>The first non-null value, or null if no non-null values were found</returns>
internal object GetFirstNonNullValue(OLVColumn column)
{
for (int i = 0; i < Math.Min(this.GetItemCount(), 1000); i++) {
object value = column.GetValue(this.GetModelObject(i));
if (value != null)
return value;
}
return null;
}
示例2: MakeSubItem
private OLVListSubItem MakeSubItem(object rowObject, OLVColumn column)
{
object cellValue = column.GetValue(rowObject);
OLVListSubItem subItem = new OLVListSubItem(cellValue,
column.ValueToString(cellValue),
column.GetImage(rowObject));
if (this.UseHyperlinks && column.Hyperlink) {
IsHyperlinkEventArgs args = new IsHyperlinkEventArgs();
args.ListView = this;
args.Model = rowObject;
args.Column = column;
args.Text = subItem.Text;
args.Url = subItem.Text;
this.OnIsHyperlink(args);
subItem.Url = args.Url;
}
return subItem;
}
示例3: CellEditEventArgs
/// <summary>
/// Create an event args
/// </summary>
/// <param name="column"></param>
/// <param name="control"></param>
/// <param name="r"></param>
/// <param name="item"></param>
/// <param name="subItemIndex"></param>
public CellEditEventArgs(OLVColumn column, Control control, Rectangle r, OLVListItem item, int subItemIndex) {
this.Control = control;
this.column = column;
this.cellBounds = r;
this.listViewItem = item;
this.rowObject = item.RowObject;
this.subItemIndex = subItemIndex;
this.value = column.GetValue(item.RowObject);
}