Click or drag to resize

DataContextRenderViewModelConfigurationTModel, THub(Object, String, String, Object) Method

Renders client-side configuration script for paged view model.

Namespace: GSF.Web.Model
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.207-beta
Syntax
public string RenderViewModelConfiguration<TModel, THub>(
	Object viewBag,
	string defaultSortField = null,
	string hubScriptName = null,
	params Object[] parentKeys
)
where TModel : class, new()
where THub : new(), IRecordOperationsHub
View Source

Parameters

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

String
Rendered paged view model configuration script.
See Also