This is a migrated thread and some comments may be shown as answers.

Dropdown Editor

1 Answer 136 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 11 Jul 2019, 04:19 AM

Does the TreeList have the ability to create have a dropdown selection for columns similar to the "Categories" on here: 

https://demos.telerik.com/aspnet-core/grid/editing-custom 

 

I followed everything on the page I believe but I can not get the dropdown to work for the TreeList.

Does the TreeList work that much differently?

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 11 Jul 2019, 01:33 PM
Hello Rob,

I would advise you to create a custom editing for the column in the TreeList.

You can use Editor("String") to specify a custom editing UI for the column. 

e.g.

columns.Add().Field(e => e.FirstName).Title("First Name").Width(220).Editor("firstNameEditor");

In this case "firstNameEditor" would be the name of the function to be called.

e.g.

function firstNameEditor(container, options) { // "Conatiner" gets the container of the TreeList column
        $('<input required name="' + options.field + '"/>') // options.field is the name of the field to which the column is bound.
            .appendTo(container)
            .kendoDropDownList({
                  ... // kendoDropDownList configuration here
            });

More information on the methods for configuring TreeListColumn you can find here.


Regards,
Nikolay
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeList
Asked by
Rob
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or