HierarchicalDataSourceBuilder
Methods
Custom()
Use it to configure Custom binding.
Example
.DataSource(dataSource => dataSource
.Custom()
.Transport(transport => transport
.Read("Read", "TreeViewData")
)
})
SignalR()
Use it to configure SignalR binding.
Example
.DataSource(dataSource => dataSource
.SignalR()
.Transport(tr => tr
.Promise("hubStart")
.Hub("hub")
.Client(c => c
.Read("read")
.Create("create")
.Update("update")
.Destroy("destroy"))
.Server(s => s
.Read("read")
.Create("create")
.Update("update")
.Destroy("destroy")))
)
Read(System.Action)
Configures the URL for Read operation.
Parameters
configurator - System.Action<CrudOperationBuilder>
Configures the Read operation settings.
Example
.DataSource(dataSource =>
{
dataSource.Read(operation => operation
.Type(HttpVerbs.Post)
.Action("Read", "TreeViewData")
);
})
Read(System.String,System.String,System.Object)
Sets controller, action and routeValues for Read operation.
Parameters
actionName - System.String
Action name
controllerName - System.String
Controller Name
routeValues - System.Object
Route values
Example
.DataSource(dataSource =>
{
dataSource.Read("Read", "TreeViewData", new { id = 1 });
})
Read(System.String,System.String)
Sets controller and action for Read operation.
Parameters
actionName - System.String
Action name
controllerName - System.String
Controller Name
Example
.DataSource(dataSource =>
{
dataSource.Read("Read", "TreeViewData");
})
Events(System.Action)
Configures the client-side events
Parameters
configurator - System.Action<DataSourceEventBuilder>
Example
.DataSource(dataSource => dataSource
.Read("Read", "TreeViewData")
.Events(events => events.RequestStart("onRequestStart"))
)
Model(System.Action)
Configures the model
Parameters
configurator - System.Action<HierarchicalModelDescriptorBuilder>
Configures the Model of the DataSource.
Example
.DataSource(dataSource => dataSource
.Read("Read", "TreeViewData")
.Model(model => model
.HasChildren("hasChildren")
)
)
ServerFiltering()
Specifies if filtering should be handled by the server.
Example
.DataSource(dataSource => dataSource
.Read("Read", "TreeViewData")
.ServerFiltering()
)
ServerFiltering(System.Boolean)
Specifies if filtering should be handled by the server.
Parameters
enabled - System.Boolean
Example
.DataSource(dataSource => dataSource
.Read("Read", "TreeViewData")
.ServerFiltering(true)
)