Finding ListView item from row index in Javascript
If I know the DisplayIndex of the开发者_运维知识库 ListView item I want to find, how can I find it in javascript?
As a reference, here is how I can do it if I know the index of the item in a GridView:
// get the gridview element
var gridView = $get('<%= this.GridView1.ClientID %>');
//Get the selected row
var curSelRow = gridView.rows[parseInt(rowIdx)+1];
Give this a shot. I haven't had a chance to test it yet, but I'll post back once I do.
var targetItem = $get('<%= lv_MyLv.Items[lv_MyLv.SelectedIndex].ClientID%>');
精彩评论