Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Grid Dropdownlist Setting

Put the html file in /App_Plugins/grid/editors/

{
"label": "CSS Class",
"description": "Specify a css class",
"key": "class",
"view": "/App_Plugins/grid/editors/dropdownlist.html",
"applyTo": "row",
"prevalues": [
"value_1",
"value_2",
"value_3",
"value_4"
]
}
<select ng-model="model.value">
<option value="" ng-selected="{{model.value == null}}">none</option>
<option ng-repeat="preval in model.prevalues" ng-selected="{{model.value != null && (model.value == preval.value || model.value == preval)}}" value="{{preval.value || preval}}">{{preval.label || preval.value || preval}}</option>
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment