本文整理汇总了C#中GridView.LocateByValue方法的典型用法代码示例。如果您正苦于以下问题:C# GridView.LocateByValue方法的具体用法?C# GridView.LocateByValue怎么用?C# GridView.LocateByValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridView
的用法示例。
在下文中一共展示了GridView.LocateByValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExpandRowByRowInfo
protected void ExpandRowByRowInfo(GridView view, RowInfo rowInfo)
{
int dataRowHandle = view.LocateByValue(0, view.Columns[descriptor.keyFieldName], rowInfo.Id);
if (dataRowHandle != GridControl.InvalidRowHandle)
{
int parentRowHandle = FindParentRowHandle(view, rowInfo, dataRowHandle);
view.SetRowExpanded(parentRowHandle, true, false);
}
}
示例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: LoadExpandedMasterRows
public void LoadExpandedMasterRows(GridView view)
{
view.BeginUpdate();
try
{
view.CollapseAllDetails();
GridColumn column = view.Columns[descriptor.keyFieldName];
for (int i = 0; i < SaveMasterRowsList.Count; i++)
{
int rowHandle = view.LocateByValue(0, column, SaveMasterRowsList[i]);
ViewState state = (ViewState)DetailViews[SaveMasterRowsList[i]];
if (state == null)
{
view.SetMasterRowExpanded(rowHandle, true);
}
else
{
view.SetMasterRowExpandedEx(rowHandle, view.GetRelationIndex(rowHandle, state.descriptor.relationName), true);
GridView detail = view.GetVisibleDetailView(rowHandle) as GridView;
if (detail != null)
{
state.LoadState(detail);
}
}
}
}
finally
{
view.EndUpdate();
}
}