是否有可能循环访问共享点列表的字段集合,并只检索我们的自定义字段而不是共享点内置字段。仅限自定义字段来自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