View Single Post
  #2 (permalink)  
Old July 30th, 2004, 09:46 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

How you display it is up to you (datagrid, datalist, repeater, listbox, dropdownlist, etc). Restricting the list is up to the data source. You can do this in a couple ways:
1) If your database has the capability, you can have it only return the first X rows. In MSSQL this is done with "TOP X" as in "SELECT TOP 10 * FROM...".
2) Get the complete list, then reduce it only the first X. If you get back a datatable (in a dataset), you could remove all the rows past the Xth row.