DataSource TagHelper Overview

The Telerik UI DataSource TagHelper for ASP.NET Core is a server-side wrapper for the Kendo UI DataSource widget.

The DataSource is an abstraction for using local data or remote data.

Initializing the DataSource

The following example demonstrates how to define the DataSource by using the DataSource TagHelper.

  <kendo-datasource name="datasource"></kendo-datasource >

Basic Configuration

The DataSource TagHelper configuration options are passed as attributes of the tag. The DataSource is an abstraction for binding the Kendo UI widgets to local and remote data and to handle various data operations with the databound Tag Helpers.

    <kendo-datasource name="dataSource" type="DataSourceTagHelperType.Ajax" server-operation="false" page-size="5">
        <transport>
            <read url="/DataSource/Products_Read" />
        </transport>
        <sorts>
            <sort field="fieldName" direction="asc" />
        </sorts>
    </kendo-datasource>
    @(Html.Kendo().DataSource<Kendo.Mvc.Examples.Models.ProductViewModel>()
        .Name("dataSource1")
        .Ajax(dataSource => dataSource
          .Read(read => read.Action("Products_Read", "DataSource"))
          .ServerOperation(false)
          .PageSize(5)
          .Sort(sort => sort.Add("FieldName").Ascending())
        )
    )

Functionality and Features

The DataSource HtmlHelper provides three main types of data sources. For more information on the Kendo UI for jQuery types of DataSource, refer to the official Kendo UI for jQuery documentation.

See Also

In this article
Not finding the help you need? Improve this article