Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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')

C#
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);}
}
Posted
Updated 30-Oct-16 5:22am
v3

1 solution

Hi,

From your question i feel you want to traverse your data which is populated in the List View control and obtained from a data base.

Currently the page size is 3 and the number of records is more than 5.
Increase the page size and all of your records should be visible.
Please go through below links:

DataPager in ASP.NET 3.5[^]
Display (Show) data in ListView from database in ASP.Net using C# and VB.Net[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900