ModuleListPage.GetGroups(ModuleListPageGrouping) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the supported groupings.
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()
Parameters
- grouping
- ModuleListPageGrouping
The name of the grouping.
Returns
The supported ListViewGroup objects.
Examples
The following example implements the GetGroups method to return two groups when the grouping is not null
.
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,
};
}
Remarks
The base class implementation returns null
.