Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8625395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:46:30+00:00 2026-06-12T07:46:30+00:00

I have have got a MVC 3 Project where I use a Kendo UI

  • 0

I have have got a MVC 3 Project where I use a Kendo UI Grid quite a lot.

A typical View looks like this:

@using Kendo.Mvc.UI
@model List<ActionViewModel>
@(Html.Kendo().Grid<ActionViewModel>()
.Name("#grid")    
.Columns(columns =>
    {
        columns.Bound(p => p.Name);
        columns.Command(command => { command.Edit(); command.Destroy(); });
})
.ToolBar(toolbar => toolbar.Create().Text(Resources.Grid.Create))
.Editable(editable => editable.Mode(GridEditMode.PopUp)))
.Sortable()
.Scrollable()
.Filterable(f=>f.Extra(true))
.DataSource(dataSource => dataSource        
    .Ajax() 
    .Events(events => events.Error("error_handler"))
    .Model(model => model.Id(p => p.Id))
    .Create(update => update.Action("Create", "Action"))
    .Read(read => read.Action("Read", "Action"))
    .Update(update => update.Action("Update", "Action"))
    .Destroy(update => update.Action("Delete", "Action"))
))

I often have to define custom editor templates for my viewmodels, these are used in Kendo UI’s edit popup.

In a Kendo UI Grid it is possible to create, update, and delete elements. The popup for edit and create uses the same editor template by default. Is there a simple way to have two separate editor templates for edit and delete?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:46:32+00:00Added an answer on June 12, 2026 at 7:46 am

    UPDATE:

    To prevent unnecessary downvotes for a 4-year-old answer, I am including the question @ataravati provided in the comments below. Go here for a better and more modern answer: Kendo UI grid – different templates for Edit and Create

    OLD ANSWER:

    This isn’t a C# answer, but it is relevant. I use the JavaScript API and managed to figure out a way to differentiate between “Add” and “Edit”, and have the popup editor react differently for each. My reasoning was that when Adding a new entry, all fields would be editable, but when Editing an existing entry, I needed to make some fields read-only.

    In a nutshell, I add a jQuery click listener for the toolbar buttons and use a set of if statements to determine whether the clicked button has a class of k-grid-edit or k-grid-add (or custom classes if I’m using custom-defined toolbar buttons in my Grid widget). Then, I store the action type (“Add” or “Edit”) in a data-attribute on the parent Grid:

    $("#grid").data("action","add");

    …which I then read within the custom popup editor template to determine whether certain fields should be read-only or not:

    if ($("#grid").data("action") === "add") { /*Do stuff*/ }

    I also use this method to hide or show toolbar buttons depending upon the situation (for example, in Inline Editor mode, The Save and Cancel buttons should only be visible while a row is in Edit Mode, so when the user selects a row in the Grid and clicks the Edit button, the hidden-by-default Save and Cancel buttons are shown, and the other buttons are hidden. Once the Edit action is completed and the user clicks on Save or Cancel, then the buttons switch back to their initial states).

    For more explicit information, here’s my Kendo UI forum thread on the topic:

    http://www.kendoui.com/forums/ui/grid/kendo-grid—how-to-have-different-custom-editor-for-update-and-create.aspx

    I posted some sample code, and another user named Philipp came up with a different solution that arrives at the same end result and posted his code as well.

    So, to answer your question:

    No. There is no simple way. The functionality is not currently included in the Kendo UI framework. It is, however, still possible with a bit of extra elbow grease. Or caffeine. 🙂

    I hope this is helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a very basic ASP.Net MVC project where I'd like to use a
I have got two pages. example.com/php.com and example.com. I use this function to set
i've got a situtation where we have a web site (mvc project), and a
I have created a sample project in asp .net mvc using vs 2010. In
I have a structure like this WebUI project - controllers, views Framework project- repositories,service
I am an MVC C# newbie. I have a project which is using the
When I have started my Spring MVC project I have got exception below: javax.servlet.ServletException:
I have Spring MVC project. I am using HSQL database and Hibernate. I have
I have got following class hierarchy in my ASP MVC 3 project. Some entry
I have got a question with regards to upgrading asp.net mvc applications from v1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.