假设我在datagrid里绑定了3个列
0列和1列是相关的数据,2列是button列
我点击某一行对应的button,如何得到该列0列具体内容?
谢谢
0列和1列是相关的数据,2列是button列
我点击某一行对应的button,如何得到该列0列具体内容?
谢谢
解决方案 »
- webBrowser 获取 iframe 元素?
- js 小问题 白送分
- 这段if语句怎么修改?
- 关于web引用
- treeview加载到客户端很慢,出错,怎么处理
- 类能写文件管理吗?类里面查询的目录为什么不是当前页面而是VS软件所在页面的。
- 为什么同一代码,每次结果不一样?
- 我想用TREEVIEW控件,下载了iewebcontrols控件,649K,可在VS。NET下不知怎么装的,装不了呀,大哥们指导一下
- asp.net读取textbox 并保存到本地
- datagrid删除数据问题!谢
- 有一个复杂的table,怎么把他导入excel,格试不能变。
- 异常详细信息: System.Runtime.InteropServices.SEHException: 外部组件发生异常。
then use e.Item.Cells[0] or use e.Item.FindControl to location your control in the first columnor if you havevoid Button_Click(Object sender, EventArgs e)
{
Button btn = (Button)sender;
DataGridItem dgi = (DataGridItem)btn.Parent.Parent; //dgi.Cells[0].Controls[0] or dgi.FindControl("..")
}
dim but as button
but=e.item.findcontrol("button")
but.Attributes.Add("onClick","alert('"+e.item.cell(0).text+"')")