提问:单击DataGrid某行触发什么事件,我想单击某行后非DataGrid的TextBox得到某行的部分数据 如果你的数据源是DataView可以用yourDataView[yourDataGrid.CurrentRowIndex]这个就是DataGrid当前行的数据DataRowView类型的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e){e.Item.Attributes.Add("onclick","window.open('WebForm2.aspx?ZoneNo="+e.Item.Cells[1].Text+"')"); e.Item.Attributes.Add("onMouseOver","this.style.backgroundColor='#000000'; this.style.cursor='hand';"); e.Item.Attributes.Add("onMouseOut","this.style.backgroundColor='#ffffff';"); } 假设ds.Tables[0]是dataGrid1的数据源string f1=ds.Tables[0].Rows[dataGrid1.CurrentRowIndex]["f1"].ToString(); 如何设计变更单? 关于用CryptoStream加密的问题 请问,怎样把有多行合并的excel表格导入SQL数据库中 winform操作word的问题 请问如何实时更新数据 请问高手:将本地一个文件复制到远程计算机上! 求Data Access Application Block中文电子文档 如何向textmode为Password的textbox赋值 Winform 2005的TreeView中怎样该选中节点的图标 VSS问题 怎样用dataGrid操作数据库? 那位同志有Microsoft Visual Studio.NET 2003的安装盘请提供下载吧,或告诉我哪有没有少文件的下载!
{
e.Item.Attributes.Add("onclick","window.open('WebForm2.aspx?ZoneNo="+e.Item.Cells[1].Text+"')");
e.Item.Attributes.Add("onMouseOver","this.style.backgroundColor='#000000'; this.style.cursor='hand';");
e.Item.Attributes.Add("onMouseOut","this.style.backgroundColor='#ffffff';");
}
string f1=ds.Tables[0].Rows[dataGrid1.CurrentRowIndex]["f1"].ToString();