【发布时间】:2011-04-13 17:53:32
【问题描述】:
我使用 Sharepoint,并尝试使用多个参数连接 Web 部件。
我的问题是如何将多个参数从客户 Web 部件传递到另一个。
我可以通过在自定义 webpart 中实现 ITransformableFilterValues 接口来传递一个参数,我想要做的是传递多个参数(例如 MyIndex2)。
// Configure interface
public bool AllowEmptyValue
{
get { return false; }
}
public bool AllowAllValue
{
get { return true; }
}
public bool AllowMultipleValues
{
get { return true; }
}
public string ParameterName
{
get { return "MyIndex"; } // Name of provided parameter
}
public ReadOnlyCollection<string> ParameterValues
{
get
{
EnsureChildControls();
List<string> MyFilterValues = new List<string>();
if (MyFilterValue != null)
{
MyFilterValues.Add(MyFilterValue); //Provided value for another web-part
}
ReadOnlyCollection<string> result = new ReadOnlyCollection<string>(MyFilterValues);
return result;
}
}
[ConnectionProvider("MyIndex", "UniqueIDForRegionConnection", AllowsMultipleConnections = true)]
public ITransformableFilterValues SetConnection()
{
return this;
}
感谢您的帮助。对不起我的英语。
【问题讨论】:
标签: sharepoint connection web-parts