Skip to content

Instantly share code, notes, and snippets.

@AaronSadlerUK
Last active January 6, 2021 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AaronSadlerUK/2f7045f3e097d4728f3b94c233d3216c to your computer and use it in GitHub Desktop.
Save AaronSadlerUK/2f7045f3e097d4728f3b94c233d3216c to your computer and use it in GitHub Desktop.
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