Hi,
I need to implemented a custom ProductFieldTypeProvider to select and sort several ID values from a custom list. The Extending Ecommerce page shows an example with a DropDownList, but no multiselection and no customizable sorting are available with DropDownList. Changing the DropDownList for a SelectionBox results in no saved values (ie. the user selects the values, but no values are saved aferwards).
I don't know if there is a bug in the SelectionBox class, or I miss something about it its configuration.
This is the code:
protected override Control Render(string id, bool enabled, string value, bool hasError, List<Dynamicweb.UI.Elements.Actions.FieldAddOn> addOns) { SelectionBox mSelectionBox = new SelectionBox(); mSelectionBox.ID = id; mSelectionBox.ShowSortRight = true; ListItem[] mListItem; mListItem = CreateListItemArrayWithAllNames(); mSelectionBox.InputLeft = mListItem; mListItem = CreateListItemArrayFromValue(value); // ...But the 'value' input is always empty, so an empty list is created!!! mSelectionBox.InputRight = mListItem; return mSelectionBox; }
Any help will be apprecisted,
Tomas