views:

101

answers:

3

Hi,

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 :(

+7  A: 

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
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?
SomeMiscGuy
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
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
AH, I can specify a minimum length... this has possibilities. let me play with it some.
SomeMiscGuy
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!
SomeMiscGuy
+2  A: 

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

Chad
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.
SomeMiscGuy
@SomeMiscGuy, that or you need to implement a lazy loading technique, similar to what is being attempted here http://stackoverflow.com/questions/3283669
Chad
A: 

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

Jacob