Hi Paul, Here is a sample you can start with.
using(SPSite site = new SPSite("http://localhost")) using (SPWeb web = site.OpenWeb()) { List<SPField> fieldsList = new List<SPField>(); SPFieldCollection fieldsCollection = web.Fields; foreach (SPField field in fieldsCollection) { Console.WriteLine(field.Title); fieldsList.Add(field); } } Use fieldsList to populate your DropDownList. You can also get Fields Collection for your lists in the same way, Cheers, Salman From: Paul Noone Sent: Thursday, November 03, 2011 8:52 AM To: mailto:ozmoss@ozmoss.com Subject: Return only spfields that are filterable Can anyone provide an example of how I can use the SPField.Filterable property to return all fields where this is true? I want to use this to dynamically populate a DropDownList control. -------------------------------------------------------------------------------- _______________________________________________ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
_______________________________________________ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss