0

We have a dropdownlist that we are populating from the database stored proc. The stored proc returns 94,060 rows. And the subroutine is adding all 94,060 items to the DropDownList. However, when running the app, the dropdownlist only shows the first 90,337 items.

Gilbert
  • 37
  • 4
  • 1
    I realize this is not an actual answer, but please rethink your UI. There has to be a better approach than a single dropdown. – DCoder Nov 20 '12 at 15:12
  • 3
    You are really adding 94k items to a DropDownList? Poor users. How long does it take to load that page? – Tim Schmelter Nov 20 '12 at 15:16
  • What other suggestions are there? One approach to create two list boxes and two stored procs. One that retrieves the top 50%, while the other retrieves the bottom 50%. Any other suggestions would be super!!! – Gilbert Nov 20 '12 at 15:20
  • 3
    @Gilbert: It will be better if you implement something like `autocomplete`. For example, have a look at [ComboBox / Autocomplete](http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/autocompleteclientside/defaultcs.aspx), Also [JQuery ASP.NET Autocomplete](http://blogs.msdn.com/b/josephkiran/archive/2011/02/25/jquery-asp-net-server-control-dropdown-autocomplete-sample.aspx) – huMpty duMpty Nov 20 '12 at 15:23
  • @Gilbert i've added some options to my answer as well. – Ryan McDonough Nov 20 '12 at 15:28

1 Answers1

3

It could be limited either by your browser or your computer, there are limits to how much both can load into memory and still run.

Try loading the page on other peoples computers, have the item count returned from the SP shown on the page as well to make sure that the correct amount is returning as well.

So on the page, have the SP return row count, and the drop down list item count as well, and see if it differs dependent on the computer.

Also to +1 the comments made, 90k+ items should not be in a drop down list, ever.

Alternatives to drop down

Searchable Data List, much like the one featured in outlook addressee add.

enter image description here

Auto Complete (put your SP results into a datatable i and then search through it with jquery)

ASP JQuery Auto Complete

Ryan McDonough
  • 9,732
  • 3
  • 55
  • 76
  • 1
    For this approach, using a [jQuery DataTable](http://datatables.net/) will be much easier. – huMpty duMpty Nov 20 '12 at 15:32
  • @huMptyduMpty I do use that for table data, though since he's currently using a dropdown list it's probably only single string of data, datatable js is a little over kill for that. – Ryan McDonough Nov 20 '12 at 15:37