开发者

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜