Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a search column which on searching shows multiple tables as results (by multiple i mean in 1000 or more) .

Problem - generated tables are shown in one page only i want them to be shown in multiple pages for better readability also i want to sort some columns of each table.

for example

in Views cshtml format i have something like this
<br />
<pre lang="C#"><section class="someclass"><br />
foreach(var item in something)<br />
{<br />
<br />
<table><br />
<tr><br />
<td>@item.a</td><br />
<td>@item.b</td><br />
</tr><br />
<tr><br />
<td>@item.c</td><br />
<td>@item.d</td><br />
</tr><br />
<br />
   </table><br />
<br />
  }<br />
 <br />
    </section><br />
<br />



and the 'var' is generally very large in count so this code generates a lot of tables
any idea how i could do paging in this case

What I have tried:

well i have tried table sorter and i am confused how to implement that in a setion..

apart from that i dont wanna use server side options i wanna keep the code in javascript ,only
Posted
Comments
Karthik_Mahalingam 23-Apr-16 2:42am    
for each item why you are creating a table, instead you can create a row only.
Himaan Singh 23-Apr-16 5:15am    
because that is the demand of my boss

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