|
DataContextRenderLookupFunctionTModel Method
|
Renders client-side Javascript function for looking up single values from a table.
Namespace: GSF.Web.ModelAssembly: GSF.Web (in GSF.Web.dll) Version: 2.4.207-beta
Syntax public string RenderLookupFunction<TModel>(
string valueFieldName,
string keyFieldName = "ID",
string lookupFunctionName = null,
string arrayName = null
)
where TModel : class, new()
Public Function RenderLookupFunction(Of TModel As {Class, New}) (
valueFieldName As String,
Optional keyFieldName As String = "ID",
Optional lookupFunctionName As String = Nothing,
Optional arrayName As String = Nothing
) As String
public:
generic<typename TModel>
where TModel : ref class, gcnew()
String^ RenderLookupFunction(
String^ valueFieldName,
String^ keyFieldName = L"ID",
String^ lookupFunctionName = nullptr,
String^ arrayName = nullptr
)
member RenderLookupFunction :
valueFieldName : string *
?keyFieldName : string *
?lookupFunctionName : string *
?arrayName : string
(* Defaults:
let _keyFieldName = defaultArg keyFieldName "ID"
let _lookupFunctionName = defaultArg lookupFunctionName null
let _arrayName = defaultArg arrayName null
*)
-> string when 'TModel : not struct, new()
JavaScript does not support generic types or methods.
View SourceParameters
- valueFieldName String
- Table field name as defined in the table.
- keyFieldName String (Optional)
- Name of primary key field, defaults to "ID".
- lookupFunctionName String (Optional)
- Name of lookup function, defaults to lookup + TModel name + valueFieldName + Value.
- arrayName String (Optional)
- Name of value array, defaults to camel cased TModel name + valueFieldName + Values.
Type Parameters
- TModel
- Modeled database table (or view).
Return Value
StringClient-side Javascript lookup function.
See Also