New to Telerik UI for ASP.NET Core? Download free 30-day trial

HierarchicalDataSourceBuilder

Methods

Custom()

Use it to configure Custom binding.

Example


              .DataSource(dataSource => dataSource
                  .Custom()
                  .Transport(transport => transport
                      .Read("Read", "TreeViewData")
                  )
              })  

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)
                )

In this article
Not finding the help you need?