I have a Grid and was wondering if there is a way to use the standard CRUD screens from the MVC application. The reason for this is I have the screens and I like using them as I have them already. I wanted to use inline editing but I never could get a way to get the drop down list to show up correctly. If not, is there an easy way to being up an Edit and Create Screen? I just want an easy way edit (and also create) a record.
Thanks for any help.
4 Answers, 1 is accepted
Hi Christine,
If you want to have a DropDownList as a Grid editor in inline editing, you will have to use an editor template. See this demo: https://demos.telerik.com/aspnet-mvc/grid/editing-custom
In it the Grid has InCell editing configured, but it can easily be modified to InLine by removing the ToolBar's save configuration:
.ToolBar(toolBar => { toolBar.Create(); toolBar.Save(); })
and setting InLine Editing mode:
.Editable(editable => editable.Mode(GridEditMode.InLine))
Check the ASP.NET MVC source section in the demo, which shows the views and controllers. The ClientCategory.cshtml view (in the EditorTemplates folder) is the one that contains the DropDownList. This is its content:
@model Kendo.Mvc.Examples.Models.CategoryViewModel
@(Html.Kendo().DropDownListFor(m => m)
.DataValueField("CategoryID")
.DataTextField("CategoryName")
.BindTo((System.Collections.IEnumerable)ViewData["categories"])
)
Regards,
Ivan Danchev
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Hi Christine,
We are sorry to hear you are having such a hard time achieving the scenarios you are after. In addition to the documentation and demos, which demonstrate the basic functionality of the components, we would recommend taking advantage of our Virtual Classroom: https://www.telerik.com/support/virtual-classroom It has different categories, UI for ASP.NET MVC including, so it can give you a better understanding of our suite of components and how to use them properly.
Moving back to the Grid, I've attached a sample runnable project to this reply, which shows a DropDownList can be used in the Grid's popup editor. The custom editor is set in the Grid's Editable configuration like this:
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("Person"))
The Person.cshtml view that contains the template can be located in Views/Shared/EditorTemplates
With regard to custom popup editors, you can find more information in the documentation here: https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/how-to/editing/custom-popup-editor
As for the the issue with the icons you mentioned, please elaborate more on exactly which icons you mean. Are they related to built-in functionality in the Grid, for example filter icons, or they are custom icons you are trying to add? In addition, a screenshot that shows the missing icons would be helpful and will give is a better idea of the case.
Regards,
Ivan Danchev
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
