重置GrindConrol焦点行FocusedRowHandle

List<model> list=this.CurrentList;

var selectModel=tempselectmodel;

//找selectModel在list中得位置

var index=list.indexOf(selectModel);

//获取在gridview中得位置

var focusRowHandle=GridView1.GetRowHandle(index);

//重置gridview得焦点行

GridView1.FocusedRowHandle=focusRowHandle;

 

Tags: