I’m wanting to implement grouping within a ComboBoxItem. My idea would be that when the pickListIcon is clicked the list would be grouped by a specific column with the groups expanded. I’m able to have the list sorted on that desired column, but would rather have the list grouped into sections by that column.
I’m trying to do this by setting the pickListProperties as follows:
ListGrid pickListProperties = new ListGrid();
pickListProperties.setShowHeader(true);
pickListProperties.setCanGroupBy(true);
pickListProperties.setGroupByField("Account Type");
pickListProperties.setGroupStartOpen(GroupStartOpen.ALL);
ComboBoxItem accounts = new ComboBoxItem();
accounts.setTitle("Accounts");
accounts.setOptionDataSource(accountListDataSource);
accounts.setAutoFetchData(true);
ListGridField accountIdField = new ListGridField("Account Id", "Id");
ListGridField accountNameField = new ListGridField("Account Name", "Name");
ListGridField accountType = new ListGridField("Account Type");
accounts.setPickListProperties(pickListProperties);
accounts.setPickListFields(accountIdField, accountNameField, accountType);
accounts.setFilterFields("Account Id", "Account Name");
accounts.setDisplayField("Account Name");
What I would expect is that the options that I set in the pickListProperties would be applied to the pickList but it appears as thought some of the settings are not applied.
Is there a list of which settings are valid for a ComboBoxItem?
Thanks.