|
DataContextRenderViewModelConfigurationTModel, THub(Object, String, String, Object) Method
|
Renders client-side configuration script for paged view model.
Namespace: GSF.Web.ModelAssembly: GSF.Web (in GSF.Web.dll) Version: 2.4.218-beta
Syntax Public Function RenderViewModelConfiguration(Of TModel As {Class, New}, THub As {New, IRecordOperationsHub}) (
viewBag As Object,
Optional defaultSortField As String = Nothing,
Optional hubScriptName As String = Nothing,
ParamArray parentKeys As Object()
) As String
public:
generic<typename TModel, typename THub>
where TModel : ref class, gcnew()
where THub : gcnew(), IRecordOperationsHub
String^ RenderViewModelConfiguration(
Object^ viewBag,
String^ defaultSortField = nullptr,
String^ hubScriptName = nullptr,
... array<Object^>^ parentKeys
)
member RenderViewModelConfiguration :
viewBag : Object *
?defaultSortField : string *
?hubScriptName : string *
parentKeys : Object[]
(* Defaults:
let _defaultSortField = defaultArg defaultSortField null
let _hubScriptName = defaultArg hubScriptName null
*)
-> string when 'TModel : not struct, new() when 'THub : new() and IRecordOperationsHub
JavaScript does not support generic types or methods.
View SourceParameters
- viewBag Object
- ViewBag for the view.
- defaultSortField String (Optional)
- Default sort field name, defaults to first primary key field. Prefix field name with a minus, i.e., '-', to default to descending sort.
- hubScriptName String (Optional)
- Javascript hub name, defaults to camel-cased THub type name.
- parentKeys Object
- Primary keys values of the parent record to load.
Type Parameters
- TModel
- Modeled database table (or view).
- THub
- SignalR hub that implements IRecordOperationsHub.
Return Value
StringRendered paged view model configuration script.
See Also