在VB的C/S结构的程序里,双击Grid里的某一行数据,可以将其值付给一个textbox的内容,请问在asp.net可以这样吗?
解决方案 »
- 防SQL注入,关键字过滤
- Excel导出如何合并单元格的问题
- 求问大神,如何捕获Page_load等事件的错误!
- 问个深奥的问题,可能一般很少用到
- 关于gridview自带的“编辑”出错问题
- 版主请留情,不知在哪里发文?想找个将很多word打包的工具,支持查询。
- 关于DataSet性能的问题
- 奇怪的问题(在线等)
- vs.net连不上服务器,怎么办?十分着急,在线等待。。。
- 求助:DataList模板注脚中加了一个组合框,但在后台程序中填充时出错?哪位高手指点一下!谢谢!!!
- 我创建了一个讨论 asp.net 下设计实现OA的QQ群:9660225!欢迎大家交流!
- 如何取得自定义web控件中的两个联动地区下拉框的值?在.aspx页面需要写什么调用代码?
{
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.SelectedItem) )
{
e.Item.Attributes.Add ("ondblclick", "js代码");
}
}
我是初学者,不太会!谢谢!!!
比如e.Item.Attributes.Add ("ondblclick", "return confirm('你确认要删除本记录吗?')");
我做過的,能實現妳的要求
{
if (e.Item.Cells[21].Text=="退件")//加入是退件的話,改變揹景顔色
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='red';this.style.color='yellow';this.style.cursor='default';");
//e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=this.getAttribute('BKC');");
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='';this.style.color='';");
}
else
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffffcc';this.style.color='buttontext';this.style.cursor='default';");
//e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=this.getAttribute('BKC');");
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='';this.style.color='';");
}testBox1.text=datagrid1.item.cell[0].text
最后一句可以實現,應該