SharePoint ListFieldIterator_文章中心
背景:
阅读新闻

SharePoint ListFieldIterator

  作者: 今日评论: [字体: ]

    public class MyListFieldIterator : ListFieldIterator

    {

        protected override void OnInit(EventArgs e)

        {

            base.OnInit(e);

            //SPContext.Current.FormContext.OnSaveHandler += new EventHandler(CustomOnSave);

        }

        protected void CustomOnSave(object sender, EventArgs e)

        {

        }


        protected override bool IsFieldExcluded(Microsoft.SharePoint.SPField field)

        {

            bool result = base.IsFieldExcluded(field);

            if (!result)

            {

                //bool result2 = BaseIsFieldExcluded(field);

                //If field matches the name of exclude it

                if (field.InternalName == "MemoWithHistory"|| field.InternalName == "MemoWithHistory2")

                {

                    return true;

                }

            }


            return result;

        }

    }
}
<MySharePoint:MyListFieldIterator runat="server"  />
<%--<SharePoint:ListFieldIterator runat="server" />--%>

来源:
录入日期:[2017/12/14 0:54:00]
收藏 推荐 打印 | 录入:mikebai | 阅读:
文章评论      
正在加载评论列表...
评论表单加载中...