如何使用 C# API 删除 FilteringScheme?
How to remove FilteringScheme using C# API?
我想知道如何从 API 中删除 FilteringScheme。我正在查看 C# API 但找不到删除或删除方法。下面的代码添加了一个,但我在添加后无法删除一个。有没有人有什么建议?
// Add a new data filtering selection.
DataFilteringSelection dataFilteringSelection = document.Data.Filterings.Add("Filtering Scheme1");
// A filtering scheme has now been implicitly added for the new data filtering selection.
FilteringScheme myFilteringScheme = document.FilteringSchemes[dataFilteringSelection];
// Let the active page use the new filtering scheme.
document.ActivePageReference.FilterPanel.FilteringSchemeReference = myFilteringScheme;
感谢 TIBCO 社区 answer,我找到了如何做到这一点。这是我需要做的:
foreach (var fs in Document.FilteringSchemes)
{
if (fs.FilteringSelectionReference.Name == "Georgi")
{
context.Document.Data.Filterings.Remove(fs.FilteringSelectionReference);
}
}
我想知道如何从 API 中删除 FilteringScheme。我正在查看 C# API 但找不到删除或删除方法。下面的代码添加了一个,但我在添加后无法删除一个。有没有人有什么建议?
// Add a new data filtering selection.
DataFilteringSelection dataFilteringSelection = document.Data.Filterings.Add("Filtering Scheme1");
// A filtering scheme has now been implicitly added for the new data filtering selection.
FilteringScheme myFilteringScheme = document.FilteringSchemes[dataFilteringSelection];
// Let the active page use the new filtering scheme.
document.ActivePageReference.FilterPanel.FilteringSchemeReference = myFilteringScheme;
感谢 TIBCO 社区 answer,我找到了如何做到这一点。这是我需要做的:
foreach (var fs in Document.FilteringSchemes)
{
if (fs.FilteringSelectionReference.Name == "Georgi")
{
context.Document.Data.Filterings.Remove(fs.FilteringSelectionReference);
}
}