本文整理汇总了C#中GridView.SetMasterRowExpanded方法的典型用法代码示例。如果您正苦于以下问题:C# GridView.SetMasterRowExpanded方法的具体用法?C# GridView.SetMasterRowExpanded怎么用?C# GridView.SetMasterRowExpanded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridView
的用法示例。
在下文中一共展示了GridView.SetMasterRowExpanded方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExpandAllRows
public void ExpandAllRows(GridView View)
{
View.BeginUpdate();
try
{
int dataRowCount = View.DataRowCount;
for (int rHandle = 0; rHandle < dataRowCount; rHandle++)
{
var data = (OrderlineModel)View.GetRow(rHandle);
if (data.ChildList != null && data.ChildList.Count > 0)
View.SetMasterRowExpanded(rHandle, true);
else
View.SetMasterRowExpanded(rHandle, false);
}
}
finally
{
View.EndUpdate();
}
}
示例2: GridExpandAllMasterRows
public static void GridExpandAllMasterRows(GridView view)
{
for (int i = 0; i < view.RowCount; i++)
view.SetMasterRowExpanded(i, true);
}
示例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();
}
}