views:

84

answers:

1

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];
+1  A: 

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%>');
Abe Miessler