Grid edit drop-down default to current cell value

1 Answer 67 Views
Grid
Scott
Top achievements
Rank 1
Scott asked on 13 Jan 2022, 04:59 PM
I'm using a kendo UI grid for MVC and I've managed to create a dropdown for a field in the grid using an editor template.  The only problem is that the drop-down does not default to the value that is currently in the field. Can someone explain how to do this or point me to a demo? Thanks.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 18 Jan 2022, 09:57 AM

Hello Scott,

 

Thank you for writing to us.

Can you open your Model C# class and check whether the corresponding field has the UIHint data attribute defined? E.g.:
        [UIHint("ClientCategory")]
        public CategoryViewModel Category 
Also, can you open the page on Chrome and check the F12 browser inspector console for any script errors interfering?


You can find a full working live demo here:
https://demos.telerik.com/aspnet-mvc/grid/editing-custom

And several runnable grid-dropdownlist integration samples here:
https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid

Feel free to check these resources and let me know if they help you.

 

Regards,
Eyup
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/.

Tags
Grid
Asked by
Scott
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or