mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
  1. Main page
  2. 杂七杂八
  3. Main content

SharePoint ListFieldIterator

2017-12-14 129hotness 0likes 0comments

    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" />--%>
Tag: Nothing
Last updated:2017-12-14

mikebai

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang