比如用模糊查询时,查“老赵”。就跳到这一行,并且选中这一行。

解决方案 »

  1.   

    SelectionMode属性设为FullRowSelect//选中某一行
    dataGridView1.Rows[2].Selected = true;
      

  2.   

    设置属性就可以了   FullRowSelect
      

  3.   

    1.显示:Datagridview属性SelectionMode属性设为FullRowSelect 
    2.选择:
    最好用BindingSource
    DataGridview.DataSource=BindingSource1;
    要看你的模糊查询在哪里查了。如在DataSet中查如有唯一字段,放到下面
    BindingSource1.Position =BindingSource1.Find(string propertyName, object key)
    这样Datagridview中相应的行就高亮显示了