Create Custom Input Types
In this document we will create a custom input type step by step. Our input type is multi-select combobox input type.
Go to
*.Core
and create a folder namedCustomInputTypes
.Create a class named
MultiSelectComboboxInputType
in that folder.Go to
AppDynamicEntityParameterDefinitionProvider
and add new input type.Go to
*.Web.Mvc\wwwroot\view-resources\Areas\AppAreaName\Views\Common\IInputTypes\
folderCreate new JavaScript file named
MultiSelectComboboxInputType.js
and fill required functions.You input type should contain these:
name Unique name of input type
(must be same with the name you use in .cs file)init initialize function that you will get
inputTypeInfo and optionsgetView the function that returns a new view for given informations. Manager uses it to create new view for inputs getSelectedValues the functions that returns selected values array.
(it must be string array. If your input type has only one selected value return it in array for example:["selectedvalue"]
)hasValues if your input type needs values
For example single line input type does not need any predefined value but combobox needs.afterViewInitialized The function that manager will trigger after view initialized. Create
MultiSelectComboBoxInputTypeProvider
that create new input type object for each request. Then add that provider toabp.inputTypeProviders
All done. Your custom input type is ready to use in dynamic parameter. Create new dynamic parameter which uses that input type, add it to an entity. Then you can go to manage page and use it.