本文介绍了如何使用javascipt lanuge从ASP.NET中的listview获取数据页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我遇到了问题。我已将一些数据插入到listview控件中。

显示数据大小是每页3条记录,listview控件有超过5条记录绑定到数据表。

但是,当我尝试使用javascript从listview控件获取数据时,只有第一个3记录获得但不是所有记录。

那么如何获取控件的所有记录,你能帮帮我吗。

如果有任何错误原谅我。



提前致谢



debases bag



我尝试过:



var lv = window.document.getElementById('tConsignment')



Hi,
I am facing a problem. I have inserted some data into a listview control.
The displaying data size is 3 records per page and the listview control has more than 5 records which are bound to a datatable.
But, when I try to get data from listview control using javascript then only 1st 3records are getting but not all records.
So how to get all records of the control, can you help me pls.
If any mistake forgive me.

Thanks in advance

debases bag

What I have tried:

var lv = window.document.getElementById('tConsignment')

for (var i = 2; i < lv.rows.length - 1; i++)
     {
         //get the reference of 1st column that is Srlno index 0
         if (lv.rows[i].cells[0].textContent != "")
         {
             node = xmlDoc.createElement("Item");
             //get the reference of 1st column that is Srlno index 0
             var AttributeNode = xmlDoc.createAttribute("Srlno");
             AttributeNode.nodeValue = lv.rows[i].cells[0].textContent;
             node.setAttributeNode(AttributeNode);}
}

推荐答案


这篇关于如何使用javascipt lanuge从ASP.NET中的listview获取数据页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 05:52