5

I find myself in a quandry that I think I know the solution to but I'd like to ask the field. I have an ASP.NET (C# 2.0 framework) page within a site which is used as a lookup. Standard gridview control, 5 columns of data, hyperlink for the 6th column to do something with record the user wants to select.

My question goes towards how to best display 'a possible' 100k records in that gridview? As it stands right now I'd sprout a few more gray hairs before it ever returns a rendered result. The gridview, for its realestate can display about 20 rows of data on the screen at a time, so paging the data still gives me 5000 pages. Adding in a rolodex-type search on A-Z the largest return set on 'J' gives me 35000 records (where alas 'X' only has 54).

Do I just break the rolodex up smaller or is there a better way to handle a situation like this?

thanks in advance!

edit: I already have the stored procedure which populates this set up for paging like GenericTypeTea suggested, again even with paging on 'J' that would give me 1750 pages. The reason I have that much data is that the amount of participants on the given auto policy. The admin needs to be able to search for a given name, or a partial. 'Jones' has 1209 records and 'Smith' has 2918 so even that makes for a rebust result set.

edit #2: added 'a possible' 100k, there is no guarentee that the account will have that many records, on the other hand it could have more :(

Christopher Klein
  • 2,773
  • 4
  • 39
  • 61
  • Do you expect users to look through 100k records before they find what they need? – matt-dot-net Jul 20 '10 at 17:50
  • right now the it is a list of 'users' sorted by last name, so the admin might at least need to scroll through alot of records before getting to what they want. – Christopher Klein Jul 20 '10 at 17:53
  • By definition, no, because there is a good way of showing it, there is _not_ too much! And if there isn't a good way of showing it, there _is_ too much! – Eric Jul 20 '10 at 19:00

3 Answers3

7

AutoComplete is your friend :)

Just let people enter the first 2 or 3 characters then filter your searches.

With a dataset that large I don't think paging would make that much sense.

jQuery has a nice example page AutoComplete Examples

Simon Hazelton
  • 1,245
  • 10
  • 13
  • the callback method looks like the best way but wouldn't it be painful to type that initial 'A' and have 26192 records attempt to load? – Christopher Klein Jul 20 '10 at 18:00
  • You could even get the autocomplete to search for "jones ha", shouldn't be too difficult to serch on Last and first name – Simon Hazelton Jul 20 '10 at 18:01
  • You would only return the first name and last name (maybe a url) to the UI. if you enforce that there are 3 chars before it searches for the last name, a space and 1 char in the first name, it should be pretty swift – Simon Hazelton Jul 20 '10 at 18:03
  • AH, I can specify a minimum length... this has possibilities. let me play with it some. – Christopher Klein Jul 20 '10 at 18:03
  • decent! I'm able to use the autocomplete functionality WITH populating the gridview, or at least it works on a small testharness. Thanks for the suggestion! – Christopher Klein Jul 21 '10 at 12:26
2

Filters. Don't show that much data. Show the first x records. And beyond that, the user will need to be more precise with their search. Nobody will look through 100k records for the one they want. I'd limit it to a couple hundred at most (10 pages, 20 per page).

Advise the user how many results there were though, or give some clue so they know that there were many that aren't shown, and they need to be more specific in their search

CaffGeek
  • 21,856
  • 17
  • 100
  • 184
  • yeah, it does sound like the way. The problem is that when we originally tested this out with like 50-100 total records people liked how you could just see everything and now its expected. I'm thinking Simon has the idea, just need to integrate it into what I have. – Christopher Klein Jul 20 '10 at 18:26
  • @SomeMiscGuy, that or you need to implement a lazy loading technique, similar to what is being attempted here http://stackoverflow.com/questions/3283669 – CaffGeek Jul 20 '10 at 18:46
0

It seems to me like adding search capabilities would be more efficient than filtering or paging.

Jacob
  • 77,566
  • 24
  • 149
  • 228