ModuleListPage.GetGroups(ModuleListPageGrouping) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
サポートされているグループを取得します。
protected:
virtual cli::array <System::Windows::Forms::ListViewGroup ^> ^ GetGroups(Microsoft::Web::Management::Client::ModuleListPageGrouping ^ grouping);
protected virtual System.Windows.Forms.ListViewGroup[] GetGroups (Microsoft.Web.Management.Client.ModuleListPageGrouping grouping);
abstract member GetGroups : Microsoft.Web.Management.Client.ModuleListPageGrouping -> System.Windows.Forms.ListViewGroup[]
override this.GetGroups : Microsoft.Web.Management.Client.ModuleListPageGrouping -> System.Windows.Forms.ListViewGroup[]
Protected Overridable Function GetGroups (grouping As ModuleListPageGrouping) As ListViewGroup()
パラメーター
- grouping
- ModuleListPageGrouping
グループ化の名前。
戻り値
サポートされている ListViewGroup オブジェクト。
例
次の例では、 メソッドを GetGroups 実装して、グループ化が でない null
場合に 2 つのグループを返します。
class DemoPage : ModuleListPage {
public DemoPage() : base() { }
ModuleListPageGrouping _entryTypeGrouping;
private ModuleListPageSearchField[] _searchFields;
// contains filter string and a ModuleListPageFilter
private MyModuleListPageFilter _filter;
ModuleListPageFilter _selectedFilter;
string sDate = "8-2-07";
ModuleListPageGrouping GetMyGrouping() {
if (_entryTypeGrouping == null) {
_entryTypeGrouping = new ModuleListPageGrouping(
"Entry Type", "Entry Type");
}
return _entryTypeGrouping;
}
protected override ListViewGroup[] GetGroups(
ModuleListPageGrouping grouping) {
if (grouping != _entryTypeGrouping)
return null;
return new ListViewGroup[] {
_inheritedGroup,
_localGroup,
};
}
注釈
基本クラスの実装では、null
が返されます。