本文整理汇总了C#中GridView.GetRowLevel方法的典型用法代码示例。如果您正苦于以下问题:C# GridView.GetRowLevel方法的具体用法?C# GridView.GetRowLevel怎么用?C# GridView.GetRowLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridView
的用法示例。
在下文中一共展示了GridView.GetRowLevel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawBackground
public static void DrawBackground(RowObjectCustomDrawEventArgs e, GridView view)
{
var painter = e.Painter as GridGroupRowPainter;
var info = e.Info as GridGroupRowInfo;
int level = view.GetRowLevel(e.RowHandle);
int row = view.GetDataRowHandleByGroupRowHandle(e.RowHandle);
info.GroupText = string.Format("{0}: {1}", view.GroupedColumns[level].Caption,
view.GetRowCellDisplayText(row, view.GroupedColumns[level]));
e.Appearance.DrawBackground(e.Cache, info.Bounds);
painter.ElementsPainter.GroupRow.DrawObject(info);
}
示例2: GetRowHandleToSelect
protected int GetRowHandleToSelect(GridView view, RowInfo rowInfo)
{
int dataRowHandle = view.LocateByValue(0, view.Columns[descriptor.keyFieldName], rowInfo.Id);
if (dataRowHandle != GridControl.InvalidRowHandle)
if (view.GetRowLevel(dataRowHandle) != rowInfo.level)
return FindParentRowHandle(view, rowInfo, dataRowHandle);
return dataRowHandle;
}
示例3: SaveSelectionViewInfo
public void SaveSelectionViewInfo(GridView view)
{
SaveSelList.Clear();
GridColumn column = view.Columns[descriptor.keyFieldName];
RowInfo rowInfo;
int[] selectionArray = view.GetSelectedRows();
if (selectionArray != null) // otherwise we have a single focused but not selected row
for (int i = 0; i < selectionArray.Length; i++)
{
int dataRowHandle = selectionArray[i];
rowInfo.level = view.GetRowLevel(dataRowHandle);
if (dataRowHandle < 0) // group row
dataRowHandle = view.GetDataRowHandleByGroupRowHandle(dataRowHandle);
rowInfo.Id = view.GetRowCellValue(dataRowHandle, column);
SaveSelList.Add(rowInfo);
}
rowInfo.Id = view.GetRowCellValue(view.FocusedRowHandle, column);
rowInfo.level = view.GetRowLevel(view.FocusedRowHandle);
SaveSelList.Add(rowInfo);
}
示例4: FindParentRowHandle
protected int FindParentRowHandle(GridView view, RowInfo rowInfo, int rowHandle)
{
int result = view.GetParentRowHandle(rowHandle);
while (view.GetRowLevel(result) != rowInfo.level)
result = view.GetParentRowHandle(result);
return result;
}
示例5: SaveExpansionViewInfo
public void SaveExpansionViewInfo(GridView view)
{
if (view.GroupedColumns.Count == 0) return;
SaveExpList.Clear();
GridColumn column = view.Columns[descriptor.keyFieldName];
for (int i = -1; i > int.MinValue; i--)
{
if (!view.IsValidRowHandle(i)) break;
if (view.GetRowExpanded(i))
{
RowInfo rowInfo;
int dataRowHandle = view.GetDataRowHandleByGroupRowHandle(i);
rowInfo.Id = view.GetRowCellValue(dataRowHandle, column);
rowInfo.level = view.GetRowLevel(i);
SaveExpList.Add(rowInfo);
}
}
}