次の方法で共有


ModuleListPage.GetGroups(ModuleListPageGrouping) メソッド

定義

サポートされているグループを取得します。

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 が返されます。

適用対象