如何双击datagrid中一行,取数据显示在同一页中的各个text文本框中,最好有例子 如何双击datagrid中一行,取数据显示在同一页中的各个text文本框中,最好有例子 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先问个问题,为什么要双击?如果人在的话加我msn:[email protected]告诉你 private void dataGrid_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e){ DataGrid.HitTestInfo hit = this.dataGrid.HitTest(e.X,e.Y) ; if(hit != null && hit.Type == DataGrid.HitTestType.Cell) { if(e.Button==System.Windows.Forms.MouseButtons.Left) { if(e.Clicks == 2) { DataRowView row = this.m_DataSet.Tables[0].DefaultView[this.dataGrid.CurrentRowIndex] ; this.txtbox.text=row[""].tostring(); this.txtbox.text=row[""].tostring(); } } }} 刚才写错了前面那部分可以不要的!private void dataGrid_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e){ if(e.Button==System.Windows.Forms.MouseButtons.Left) { if(e.Clicks == 2) { DataRowView row = this.m_DataSet.Tables[0].DefaultView[this.dataGrid.CurrentRowIndex] ; this.txtbox.text=row[""].tostring(); this.txtbox.text=row[""].tostring(); } }} dataGridView.DataSource 与一 dataBindingSource 绑定:双击事件 :DataRow dr =(this.dataBindingSource.Current as DataRowView).Row;this.textBox1.Text=dr["字段名"].ToString();... System.Windows.Forms.MouseEventArgs eweb 程序,上面的怎么写? 上面FORM的例子很好,但我要的是web的,请高手帮忙给个方法~ C#中的类 string replace问题 跟着鼠标轨迹画线,问题多多 怎样把一段javascript改写成后台?急!!! 如何修改文件夹名称? 为什么不显示快速信息呢? 服务器连接客户端后的Socket 对象内RemoteEndPoint怎样转换成我要的IP和端口呀,我要显示的。 网络编程的问题,高手进.... 数据库连接指教?(我给100分) 100分,朋友们,有谁使用c#做过亚马逊的api的开发吗?有谁能给我一个能运行的demo 请教:如何更新shdocvw.dll文件 无法隐藏的窗体
{
DataGrid.HitTestInfo hit = this.dataGrid.HitTest(e.X,e.Y) ; if(hit != null && hit.Type == DataGrid.HitTestType.Cell)
{
if(e.Button==System.Windows.Forms.MouseButtons.Left)
{
if(e.Clicks == 2)
{
DataRowView row = this.m_DataSet.Tables[0].DefaultView[this.dataGrid.CurrentRowIndex] ;
this.txtbox.text=row[""].tostring();
this.txtbox.text=row[""].tostring(); } } }
}
private void dataGrid_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button==System.Windows.Forms.MouseButtons.Left)
{
if(e.Clicks == 2)
{
DataRowView row = this.m_DataSet.Tables[0].DefaultView[this.dataGrid.CurrentRowIndex] ;
this.txtbox.text=row[""].tostring();
this.txtbox.text=row[""].tostring();
} }}
DataRow dr =(this.dataBindingSource.Current as DataRowView).Row;this.textBox1.Text=dr["字段名"].ToString();
...