首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

怎么在前台Script脚本中获得GridView的某一行的DataKeys

2012-02-14 
如何在前台Script脚本中获得GridView的某一行的DataKeys?如何在前台Script脚本中获得GridView的某一行的Da

如何在前台Script脚本中获得GridView的某一行的DataKeys?
如何在前台Script脚本中获得GridView的某一行的DataKeys?



[解决办法]
在gridview中以模板列的方式,保存DataKeysName
然后用js去解析html

var e=document.getElementById(obj).parentElement.parentElement;
if(e.tagName == 'TR ')
{
document.getElementById( "hid_ID ").value=e.cells(0).innerHTML;
}
[解决办法]
使用模版列,嵌入隐藏域,存储键值, js 获取此隐藏域的值

热点排行