我使用Sharepoint,尝试连接具有多个参数的Web部件。ITransformableFilterValues具有两个或更多参数的接口[SharePoint WebParts]
我的问题是如何从custome web部件传递多个参数到另一个参数。
我能够通过在自定义Web部件中实现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;
}
感谢您的帮助。抱歉我的英语。