DEV GridView快速定位到指定行
Posted wangpenghan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DEV GridView快速定位到指定行相关的知识,希望对你有一定的参考价值。
int focuseHandle = gv.FocusedRowHandle; GridColumn column = gv.Columns["plan_id"]; if (column != null) { if (focuseHandle >= 0) { var topRow = gv.GetRow(topHandle) as grid_data; ; var fRow = gv.GetRow(focuseHandle) as grid_data; gc.DataSource = data; gv.FindFilterText = btn_Search.Text; int newTopRow = gv.LocateByValue(0, column, topRow.plan_id); if (newTopRow != GridControl.InvalidRowHandle) gv.TopRowIndex = newTopRow; focuseIndex = gv.LocateByValue(0, column, fRow.plan_id); if (focuseIndex != GridControl.InvalidRowHandle) { gv.FocusedRowHandle = focuseIndex; gv.SetMasterRowExpanded(focuseIndex, true); } }
以上是关于DEV GridView快速定位到指定行的主要内容,如果未能解决你的问题,请参考以下文章