use*_*676 3 javascript asp.net gridview
我有一个GridView,我在javascript函数中有一个行索引.现在我想使用javascript在GridView中获取该索引的Column值.请告诉我怎么做?
看一下这个...
var tbl = document.getElementById('Gridview1');
var tbl_row = tbl.rows[parseInt(RowIndex) + 1];
var tbl_Cell = tbl_row.cells[no of the cell];
var value= tbl_Cell.innerHTML.toString();
Run Code Online (Sandbox Code Playgroud)
这里no of the cell表示列号.
如果是模板字段,您可以试试这个..
var value=document.getElementById('GridViewId_ColumnID_' + RowIndex).value;
Run Code Online (Sandbox Code Playgroud)