dataGrid1.Select(dataGrid1.CurrentCell.RowNumber);

解决方案 »

  1.   

    可以在DataGridDataBound的事件中用
    e.cell.add("JavaScript实现双击事件");应该是这样,代码忘了。不过思路没错。呵呵。
      

  2.   

    这个方法没用~DoubleClike会变成对Cell相应
      

  3.   

    dataGrid1.Select(dataGrid1.CurrentRowIndex);
      

  4.   

    不是阿~~我不是要选中一行~~~而是要对这一行的DoubleClick响应~~~~这种方法会直接处理到Cell中去~~变成选中Cell中的文字了
      

  5.   

    private void dataGrid1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
    {
    Point pt = new Point(e.X,e.Y);
    DataGrid.HitTestInfo hit = dataGrid1.HitTest(pt);
    if(hit.Type == DataGrid.HitTestType.Cell) 
    {
    dataGrid1.Select(hit.Row); 
    }
    }
      

  6.   

    双击该行的事件该如何写吗?DataGrid中没有Double_Clilk事件吗?
      

  7.   

    可以在DataGridDataBound的事件中用
    e.cell.add("JavaScript实现双击事件");
      

  8.   

    for(int i=dataGrid_List.Controls.Count-1;i>0;i--)
        if(dataGrid_List.Controls[i].GetType()==typeof(System.Windows.Forms.DataGridTextBox))
    dataGrid_List.Controls.RemoveAt(i);这样就不会选中文本编辑控件了,也不会让文本控件先接收到鼠标事件