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 got a Data Form Web Part in SharePoint 2010 Designer that I'd like to customize so users can filter it on one of the columns. In other words, they'd be able to drop the web part in, then choose "Edit Web Part" from the down arrow, and then in the properties dialog, go to the Miscellaneous tab. There, you'd have a field labeled "Filter:" and the user would enter a text to filter the list used in the web part.

Is this possible? Any example? Thanks.

share|improve this question
up vote 4 down vote accepted

You would need to create your own subclass the DataFormWebPart. Once that is done, you can expose simple text properties by adding attributes like these to the WebPart property that you wish the user to be able to change.

WebDisplayName("User name"),
WebDescription("The Full Username"),

However, if you are looking to go for anything more advanced then you will need to look into creating your own custom ToolPart. More detailed instructions are available at:

share|improve this answer
Thanks, Dave. This is very helpful. How does the web part read the custom properties? For example, if we have a Filter field, how do we read and pass that to our DataFormWebPart? – Alex C Jul 19 '11 at 5:46
I'm no expert on the DataFormWebPart but my guess would be that you would have to override the .FilterField and .FilterValue properties in your subclass and then have them return the Field/Value that you wish to apply the user filtering against. – Dave Wise Jul 19 '11 at 16:41

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.