在Javascript中从行索引中查找ListView项

时间:2010-07-21 16:01:00

标签: javascript listview

如果我知道要查找的ListView项的DisplayIndex,我该如何在javascript中找到它?

作为参考,如果我知道GridView中项目的索引,我就可以这样做:

//  get the gridview element
var gridView = $get('<%= this.GridView1.ClientID %>');
//Get the selected row
var curSelRow = gridView.rows[parseInt(rowIdx)+1];

1 个答案:

答案 0 :(得分:1)

给它一个机会。我还没有机会测试它,但是一旦我这样做,我会回复。

var targetItem = $get('<%= lv_MyLv.Items[lv_MyLv.SelectedIndex].ClientID%>');
相关问题