簡體   English   中英

我正在嘗試在Web部件中使用SharePoint ITransformableFilterValues多個值

[英]I am trying to use the SharePoint ITransformableFilterValues multiple values in web part

這是我的代碼:

protected override void CreateChildControls()
        {
        }

        public bool AllowAllValue
        {
            get { return true; }
        }

        public bool AllowEmptyValue
        {
            get { return true; }
        }

        public bool AllowMultipleValues
        {
            get { return true; }
        }

        public string ParameterName
        {
            get { return "Label"; }
        }

        public System.Collections.ObjectModel.ReadOnlyCollection<string> ParameterValues
        {
            get
            {
                string[] labels = { "01082-002", "01082-003" };
                return new ReadOnlyCollection<string>(labels);
            }
        }
        [ConnectionProvider("Binder Label Filter", "ITransformableFilterValues", AllowsMultipleConnections = true)]
        public ITransformableFilterValues SetConnectionInterface()
        {
            return this;
        }

我正在嘗試傳遞2個不同的項以用於過濾列表。 我可以讓它工作。 但是,過濾器中實際上僅使用字符串數組中的第一項。 不確定我缺少什么。

  1. 轉到頁面並對其進行編輯。

  2. 展開過濾器提供程序Web部件上的菜單,依次單擊“連接” ,單擊先前已建立的連接(使用過濾器-消費者部件),然后在彈出窗口中單擊“刪除連接”將其刪除

  3. 重新建立連接,但是這次在第一個彈出窗口中選擇連接類型為“ Get Filter Values From”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM