Hi,
I think that you need to create a custom widget that inhertis from "epi-cms/contentediting/editors/CheckBoxListEditor"
Ok!
If there is no built in support for this, I guess it's the only way. But I'm guessing this is rather complicated since the source for the list is SelectItem? I would probably have to create a custom class for the items as well...
The SelectionFactory works on ISelectItem interface. You could check what happened when you return object of class:
class ExtendedSelection: ISelectItem { public object Value { get; set; } public string Text { get; set; } public bool Enabled { get; set; } }
Then debug JavaScript widget CheckBoxListEditor and check what is inside this.selections property. Maybe there will enabled property as well.
Hi!
Does anyone know if it's possible to add custom attributes per SelectItem from a SelectionFactory? I'm creating a property with a custom EditorDescritor to select multiple values in a CheckBoxListEditor (similar to the SelectMultiple attribute)
I would like to have a SelectionFactory generated from a category node. Some of these categories are not selectable and I would like to mimic this behaviour in the CheckBoxListEditor as well. I don't want to hide them or anything, just disable the checkboxes or make them readonly or something like that.
It seems SelectItem only has two properties for Text and Value, so how would I do this?