Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5959371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:40:31+00:00 2026-05-22T18:40:31+00:00

I am looking for some general wisdom here. I am looking for an elegantly

  • 0

I am looking for some general wisdom here.

I am looking for an elegantly simple way to limit the number of rows in a table that are presented on a page with a “view all >>” to get the whole table presented in the view. I considered all of the following,… some in combination:

  1. two different partials,… one that lists a limited number of rows with a “view all >>” link at the bottom and a second that lists all with a “collapse >>” link at the bottom.
  2. using jQuery
  3. a css solution
  4. ajax

Any links and / or snippets would be helpful in addition to your rationale for choosing one over another. I would prefer to minimize server / database requests without creating a voluminous coding monument to ingenuity of the programmer (me) :=]

Thanks!

UPDATE: Look here to see code written before that could be adapted. Many thanks to Neal for the jsfiddle.net resource.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:40:31+00:00Added an answer on May 22, 2026 at 6:40 pm

    A GREAT solution for big tables is a Grid. My grid of choice is DataTables

    Grids solve a lot of problems: sorting, paging, filtering, ajax loading, and showing/hiding results. It’s likely you’re only talking about the limiting portion of the equation, but I’d submit that ALL the features have a value in interfaces, so they’re all worth looking at.

    Setting it up is easy and you have three options for data:

    1. Build a proper HTML table with <thead> and <tbody> tags. The grid interprets the DOM and styles accordingly.
    2. Provide a valid JSON string with table data. DataTables builds the HTML for you.
    3. Supply JSON via AJAX. This also allows you to "pipeline" data to lookup data ahead of and behind the desired.

    Datatables is JQuery driven, so you’ll have to include Jquery and the DataTables code. There is also a bit of CSS to make things "pretty" That’s it….pretty easy. Once you get the hang of it, producing a new DataTable from scratch takes 2-3 minutes. Considering the features, that’s a minimal investment in your UI.

    As to performance, I have a DataTable handling 2.5 million records without fail. It utilizes JSON pipelining, paging, sorting, and filtering (and a well-indexed MySQL DB) to maintain acceptable performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for some general feedback here. I have a very simple application
I'm looking for some general advice on the most efficient way to go about
Ok, Here is the situation, I am looking for some general input on the
Looking for some general advice here. Option 1. Would it be best to have
I've been looking at some Azure samples and doing some general searching around Table
I'm looking for some general Optimization Correctness Extensibility advice on my current C++ Hierarchical
Looking for some direction here as I'm running into some migration problems. We have
Looking for some advice on the best way to implement localization along with client
just looking for some general direction/best practice about when to use a lookup value
I'm looking for some general guidance as to how to return a user back

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.