SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've associated an asp:dropdown with an SPDataSource - What I'm trying to do, is simply display all available categories for a certain custom list - The issue is that the SPDataSource only shows categories for the items that have been added, but on top of it, it shows one category for each item. So if I have 5 items, then I'll get 5 categories with some duplicates.

The Custom list categories are a simple list of choices, such as:

  • CategoryA
  • CategoryB
  • CategoryC

That are made to be selectable via a dropdown when creating the item.

When read via SPDataSource and fed to an ASP:DropDown, I get: - CategoryA - CategoryB - CategoryA - CategoryA

Obviously reading from the items available - I would like to consolidate the list to only show 1 of each category.

Thanks for any help/comment.

share|improve this question
up vote 0 down vote accepted

For those interested I ended up removing the SPDataSource and simply adding a Sharepoint filter webpart, linked to the data webpart, instead of using the control source as the filter.

share|improve this answer

When I run into an issue like this, I create a list of the categories that stands on its own and use it to populate the dropdown.

I have a list that shows in the field of Title:

  • Hazardous Waste
  • NonHazardous Waste
  • Universal Waste
  • and others....

This limits user input to only those authorized categories.

share|improve this answer
The issue here is that you take away the dynamic/admin part of the Category list - By using a custom list library I'm able to provide an admin for the user to add/remove their own categories. Your solution doesn't provide this flexibility – TeckniX Apr 14 '14 at 11:23
Give them access to the external list. This would make it so that misspellings and other variations are limited. Also as they would be have unique ID numbers by which they are referred, you could rename a category and it would cascade throughout your site without additional labor. I tend to be a control freak with my data and like to limit user-assigned categories or at least provide oversight. Thanks for reading my proposal and providing your insight. – EFH Apr 14 '14 at 14:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.