private bool SetHtmlAttributesChecked(bool isSelectedByDefault, IMultiSelectLookupValueField lookupValueField, IEnumerable <IMultiSelectLookupValueField> dataStoreValues) { if (_checkboxListBuilderDataContainer.Mode == Mode.Create) { return(isSelectedByDefault || lookupValueField.IsSelected); } var dataStoreValue = dataStoreValues.FirstOrDefault(o => o.Value == lookupValueField.Value); return(dataStoreValue != null && dataStoreValue.IsSelected); }
private static string SetSelectedItemInOptionElement(IMultiSelectLookupValueField item) { return(item.IsSelected ? "selected=\"selected\"" : string.Empty); }