Skip to content

Creating a TreeListDataSource instance using the HTML Helpers does not set the DataSource type #6664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aleksandarevangelatov opened this issue Dec 17, 2021 · 0 comments

Comments

@aleksandarevangelatov
Copy link
Contributor

aleksandarevangelatov commented Dec 17, 2021

Bug report

Creating a TreeListDataSource instance using the HTML Helpers does not set the DataSource type.

Reproduction of the problem

  1. Define a TreeListDataSource
@(Html.Kendo().DataSource<Kendo.Mvc.Examples.Models.TreeList.EmployeeDirectoryRemoteModel>()
    .Name("treedata")
    .TreeList(dataSource => dataSource
        .ServerOperation(true)
        .Read(read => read.Action("Index", "EmployeeDirectory"))
        .Model(m => {
            m.Id(f => f.EmployeeId);
            m.ParentId(f => f.ReportsTo);
            m.Field(f => f.FirstName);
            m.Field(f => f.LastName);
            m.Field(f => f.ReportsTo);
        })
    )
)
  1. Inspect the generated script and note the type is not set to aspnetmvc-ajax - Example REPL. Defining the DataSource as part of the TreeList component sets the type as expected - TreeList Remote DataBinding Demo

Expected/desired behavior

TreeListDataSource instance defined as a standalone component or as part of the TreeList component should have the same configuration.

Workaround

If you need to use an external DataSource with an ASP.NET Core TreeList HTML Helper configure the TreeListDataSource using Kendo UI for jQuery:

var TreeListDataSource = new kendo.data.TreeListDataSource({
        type: "aspnetmvc-ajax",
        transport: {
           //transport configuration
        },
        schema: {
          //schema configuration
        }
       //additional configuration options
})

Environment

  • Kendo UI version: 2021.3.1207
  • Browser: [all]
@kendo-bot kendo-bot added the FP: Unplanned Sync status with associated Feedback Item label Dec 17, 2021
@aleksandarevangelatov aleksandarevangelatov self-assigned this Dec 17, 2021
@kendo-bot kendo-bot added FP: In Development Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels Dec 23, 2021
@mparvanov mparvanov added this to the 2021.R3.SP.next milestone Jan 6, 2022
@kendo-bot kendo-bot added FP: Completed Sync status with associated Feedback Item and removed FP: In Development Sync status with associated Feedback Item labels Jan 6, 2022
@MilenaCh MilenaCh modified the milestones: 2021.R3.SP.next, 2022.R1 Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants