3
Answers

Pagination using Jquery in SharePoint

Photo of Vipin Tyagi

Vipin Tyagi

10y
958
1
Hey,
First of all thanks to C# Corner for being a good part of Programmers.
Here I want to describe my problem which i am facing.
I fetched data from sharepoint list using jquery on page.
but now i want to apply pagination without using any plugin.
code is as below to display data :
used for fetch 
liHtml = liHtml + "<tbody><tr><td>" + $(this).attr("ows_SNo")
+ "</td><td>" + col2 + "</td><td>"
+ col3 + "</td><td>" + col4 + "</td>
<td>"
+ col5 + "</td><td>" + col6 + "</td>
</tr></tbody>"

table structure:
<table id="CP" width="100%" border="0" cellpadding="3" cellspacing="1"><thead><tr><th scope="col">SNo</th><th scope="col">BookJournalTitle</th><th scope="col">BookType </th><th scope="col">ISBNNumber</th><th scope="col">BookJournalAuthor</th><th scope="col">INRPrice</th><th scope="col">Title</th></tr></thead> </table>  Now please let me know how can i apply pagination using Jquery so that only 5 rows display per page and pagination work on NEXT PREVIOUS button.
Thanks. 

Answers (3)

0
Photo of Crish
NA 3.7k 76.4k 14y
Hi

If you are doing these things in vb.net code then you can use conveter for  Converting from C# to VB problem.

To convert the code please follow this link

http://www.developerfusion.com/tools/convert/csharp-to-vb/
0
Photo of Jiteendra Sampathirao
NA 6.9k 1.5m 14y
Hi,

If you are doing these things in vb.Net code behind you can see the classes, methods and events on the top of the coding page.
There you can see the button id as mnuItmQuit in left side dropdownlist and those events and methods are in right dropdownlist.
So select the button id and go for the events which are existed in right Dropdownlist.

Then you can see the code in coding page like this:

 Protected Sub
mnuItmQuit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuItmQuit.Click
//Your code goes here
End sub

--------------------------------------------------------------------------------------------------------------------------------
If this post helped you, then tick the "Do you like this Answer" checkbox which is placed at above this post.