Is there a way to use a template for popup editing in a treeview ?
By default, the popup displays all the model's fields but i want to hide some.
I can't figure out how to do that.
Thanks for your help.
3 Answers, 1 is accepted
answered on 29 Jan 2019, 02:02 PM
You could add partial view in the "Views\Shared\EditorTemplates" folder with the same name as the model bound to the TreeList. For example, adding a partial view with the name "EmployeeDirectoryModel.cshtml" in the folder will display its content when the TreeList is configured to be bound to that model:
Thank you Konstantin. I took the second solution. It's a good start but not working yet. The partial view displays, but the "save" button triggers a 500 error. Data are not binded and the create action receives an empty entity. I there a special way to bind to the model in the partial view ? I used classic @Html.EditorFor(m=>...)