是否有可能循環訪問共享點列表的字段集合,並只檢索我們的自定義字段而不是共享點內置字段。僅限自定義字段來自Sharepoint列表
using (SPSite site = new SPSite("http://localhost/"))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["My List"];
foreach (SPField field in list.Fields)
{
//We also get sharepoint built-in column here. And we don't want that, just our
//custom created fields.
}
}
}
任何幫助,將不勝感激。
感謝
神奇的方法。這就像一個冠軍。 – 2011-03-22 02:14:19