Implement dropdown tree control in kendo ui grid in mvc5

1 Answer 161 Views
DropDownTree
froger
Top achievements
Rank 1
Iron
froger asked on 01 Oct 2021, 05:41 AM

Hi,

I have one requirement need to implement dropdown tree in kendo ui grid using mvc

 

can any one provide sample code

 

thanks

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 05 Oct 2021, 11:02 AM

Hello Mahesh,

Thank you for the details provided.

Find attached a sample project that includes the desired implementation.

Make the needed tests locally with the project attached and let me know if further assistance is needed.

 

Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

froger
Top achievements
Rank 1
Iron
commented on 05 Oct 2021, 12:25 PM

Hi,

Here i am attaching updated code can you please display EmployeeNames values on initial load of grid  and after clicking of edit button display values on dropdown control based upon values

 

can you please help me

 

Anton Mironov
Telerik team
commented on 08 Oct 2021, 09:47 AM

Hi Mahesh,

Thank you for the modified sample project provided.

In order to achieve the desired behavior, there are a couple of things to change. As in the Editing Custom Editor demo, the model should be used for the column of the Grid. The Employee model in this case. 

You should populate a List of Employees in the Controller for the default values.

In the Editor Template, you are using "ItemViewModel" which is a different model than Employee. Use the "EmployeeName" for the "DataTextField" and remove the "ValuePrimitive" functionality. 

The logic above will give the opportunity to use ClientTemplate for representing the EmlployeeName property in the DropDownTree.

The Update Action needs to be updated as well.

The displaying options are now implemented in the sample project as per the task conditions. The sample project is attached to this reply.

Make the needed tests locally with the project attached and let me know if this is the desired behavior.

Best Regards,
Anton Mironov

Tags
DropDownTree
Asked by
froger
Top achievements
Rank 1
Iron
Answers by
Anton Mironov
Telerik team
Share this question
or