本文整理汇总了C#中GridView.GetRow方法的典型用法代码示例。如果您正苦于以下问题:C# GridView.GetRow方法的具体用法?C# GridView.GetRow怎么用?C# GridView.GetRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridView
的用法示例。
在下文中一共展示了GridView.GetRow方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RefreshView
public static void RefreshView(GridView view)
{
try
{
if (((view.GridControl != null) && !view.GridControl.Disposing) && !view.GridControl.IsDisposed)
{
List<int> list = new List<int>();
for (int i = 0; i < view.RowCount; i++)
{
int visibleRowHandle = view.GetVisibleRowHandle(i);
if ((visibleRowHandle >= 0) && !view.GetMasterRowExpanded(visibleRowHandle))
{
EventLog.WriteLine("Row {0} is collapsed", new object[] { view.GetRow(visibleRowHandle) });
list.Add(view.GetRow(visibleRowHandle).GetHashCode());
}
}
view.RefreshData();
bool flag = false;
for (int j = 0; j < list.Count; j++)
{
for (int k = 0; k < view.RowCount; k++)
{
int rowHandle = view.GetVisibleRowHandle(k);
if (view.GetRow(rowHandle).GetHashCode() == list[j])
{
EventLog.WriteLine("Re-collapsing row {0}", new object[] { view.GetRow(rowHandle) });
view.CollapseMasterRow(k);
flag = true;
}
}
}
if (!view.IsFirstRow && (view.DetailLevel != 0))
{
view.MoveFirst();
flag = true;
}
if (flag)
{
view.Invalidate();
}
}
}
catch (Exception exception)
{
ErrorLog.WriteLine(exception);
}
}
示例2: FocuseRow
/// <summary>
/// ���ñ��Ľ����е�ָ���Ķ�����
/// </summary>
/// <param name="gridView">����GridView</param>
/// <param name="row">ָ���Ķ���</param>
public static void FocuseRow(GridView gridView, object row)
{
int count = gridView.RowCount;
for (int i = 0; i < count; i++)
{
object obj = gridView.GetRow(i);
if (obj == row)
{
gridView.FocusedRowHandle = i;
break;
}
}
}
示例3: CheckGridExpand
private void CheckGridExpand(GridView gridView)
{
if (this.IsCheckingExpand)
{
try
{
for (int i = 0; i < gridView.RowCount; i++)
{
if (gridView.GetRow(i) != null)
{
gridView.ExpandMasterRow(i);
}
}
}
catch (Exception exception)
{
ErrorLog.WriteLine(exception);
}
}
}
示例4: 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();
}
}
示例5: GetSelectedRow
private Puerto GetSelectedRow(GridView view)
{
return (Puerto)view.GetRow(view.FocusedRowHandle);
}
示例6: SelectRow
void SelectRow(GridView currentView, int rowHandle, bool select, bool invalidate)
{
if (IsRowSelected(currentView, rowHandle) == select) return;
object row = currentView.GetRow(rowHandle);
if (select)
selection.Add(row);
else
selection.Remove(row);
if (invalidate)
Invalidate(currentView);
OnSelectionChanged();
}
示例7: DoRowDoubleClick
private PipeTestResult DoRowDoubleClick(GridView view, Point pt)
{
PipeTestResult row = null;
GridHitInfo info = view.CalcHitInfo(pt);
if(info.InRow || info.InRowCell)
{
row = (PipeTestResult)view.GetRow(info.RowHandle);
}
return row;
}
示例8: GetSelectedRow
private Agente GetSelectedRow(GridView view)
{
return (Agente)view.GetRow(view.FocusedRowHandle);
}
示例9: GetSelectedRow
private CotizacionDirecta GetSelectedRow(GridView view)
{
return (CotizacionDirecta)view.GetRow(view.FocusedRowHandle);
}
示例10: GetEntityByRowHandle
private object GetEntityByRowHandle(int rowHandle, GridView gridview)
{
if (gridview.IsDataRow(rowHandle))
return gridview.GetRow(rowHandle);
else
return null;
}
示例11: IsRowSelected
public bool IsRowSelected(GridView currentView, int rowHandle)
{
if (currentView.IsGroupRow(rowHandle))
return IsGroupRowSelected(currentView, rowHandle);
object row = currentView.GetRow(rowHandle);
return GetSelectedIndex(row) != -1;
}
示例12: GetSelectedChannels
private List<ChannelInfo> GetSelectedChannels(GridView gview)
{
var channels = new List<ChannelInfo>();
foreach (int rowHandle in gview.GetSelectedRows())
{
if (gview.IsDataRow(rowHandle))
channels.Add((ChannelInfo)gview.GetRow(rowHandle));
}
return channels;
}
示例13: GetChildDataRowHandles
public static void GetChildDataRowHandles(GridView view, int rowHandle, List<Message> list)
{
for(int i = 0; i < view.GetChildRowCount(rowHandle); i++) {
int row = view.GetChildRowHandle(rowHandle, i);
if(row >= 0)
list.Add(view.GetRow(row) as Message);
else
GetChildDataRowHandles(view, row, list);
}
}