this.dataGrid1.DoubleClick += new system.EventHandler(this.dataGrid1_DoubleClick); // then in our handler we might do this. This assumes a double click sets 
// the focus object value = dataGrid1[ dataGrid1.CurrentCell ]; 
-------------------------------------------------------------------
http://www.syncfusion.com/faq/winforms/Files/datagriddoubleclick.zip
http://expert.csdn.net/Expert/topic/1577/1577810.xml?temp=.9558527

解决方案 »

  1.   

    我参照www.syncfusion.com/faq/winforms/Files/datagriddoubleclick.zip的例子,在窗体中声明了1个全局的tablestyle和9个全局的textboxcolumnstyle,在具体的绑定过程中再根据列数增加textboxcolumnstyle。在窗体的构造函数中挂钩事件
    TextBoxColumn1.TextBox.MouseDown += new MouseEventHandler( TextBoxMouseDownHandler );
    TextBoxColumn1.TextBox.DoubleClick += new EventHandler( TextBoxDoubleClickHandler );
      可运行时通过断点发现这两个语句执行了,在双击控件的数据行中的文本框时没有反映(事件中有事件判断的语句和一个提示框),这个2个事件没有执行,可我与例子中写的是一样的,这是什么原因?