/// 
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Grid_CurrentCellChanged(object sender, System.EventArgs e)
{
 Grid.Select(this.Grid.CurrentCell.RowNumber);  }

解决方案 »

  1.   

    How can I select the entire row when the user clicks on a cell in the row?
    http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q689q
      

  2.   

    楼上两位可能理解错了我的意思。我要的并不是这种效果!
    而是像listBox那样的选定!
      

  3.   

    MouseUp事件里加上下面代码system.Drawing.Point pt = new Point(e.X,e.Y);
    DataGrid.HitTestInfo hit = this.datagrid.HitTest(pt);
    if(hit.Type == DataGrid.HitTestType.cell)
    {
          this.datagrid.Select(hit.Row);
    }
      

  4.   

    哪种效果?
    不要MouseUp那Down也可以哦
      

  5.   

    第一:Mouse Down的时候就是整行了。
    第二:整行的时候会有像ListBox的选取那样的“被选定行外围的虚线框”。
      

  6.   

    gkwww(奔放)对,在事件中执行方法就行了。
    只要是
    Grid.Select(this.Grid.CurrentCell.RowNumber);