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 9105925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:13:01+00:00 2026-06-17T02:13:01+00:00

I have a kendo grid with data in it and multiple columns (say col

  • 0

I have a kendo grid with data in it and multiple columns (say col 1, 2, and 3). Columns 1, 2, 3 need to be able to be edited (or preventing editing) based off the values of each other. This is row specific.

For instance, if column 1 (date) is < column 2 (date) then column 3 is not allowed to be edited.

I know it’s simple enough to disable or enable an entire column but my requirements are row specific. So row 1 could have column 3 enabled and row 2 could have column 3 disabled.

Any thoughts?

  • 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-17T02:13:03+00:00Added an answer on June 17, 2026 at 2:13 am

    My suggestion is creating an editor function that validates the condition. This of course has the disadvantage that is an ad-hoc solution but … it works!

    Lets have the following entries (data of the DataSource):

    var entries = [
        { id:1, col1: new Date(2012, 11, 31), col2: new Date(2013, 0, 1), col3: "Yes" },
        { id:2, col1: new Date(2013, 0, 1), col2: new Date(2013, 0, 1), col3: "No" },
        { id:3, col1: new Date(2013, 0, 2), col2: new Date(2013, 0, 1), col3: "No" }
    ];
    

    Then I define the grid as:

    var grid = $("#grid").kendoGrid({
        dataSource : {
            data    : entries,
            schema  : {
                model: {
                    id    : "id",
                    fields: {
                        col1: { type: "date"},
                        col2: { type: "date"},
                        col3: { editable: true }
                    }
                }
            },
            pageSize: 3
        },
        columns    : [
            { field: "col1", title: "Col1", format: "{0:yyyy-MM-dd}" },
            { field: "col2", title: "Col2", format: "{0:yyyy-MM-dd}" },
            { field: "col3", title: "Edit?", editor: checkAndEdit }
        ],
        editable   : "incell",
        navigatable: true,
        pageable   : true
    }).data("kendoGrid");
    

    Where col1 and col2 are dates and col3 is a string that can be edited if and only if col1 is less than col2.

    I define checkAndEdit function as follow:

    function checkAndEdit(container, options) {
        if (options.model.col1 < options.model.col2) {
            $('<input data-bind="value:' + options.field + '" ' +
                    'data-format="' + options.format + '" ' +
                    'class="k-input k-textbox"/>')
                    .appendTo(container);
        } else {
            grid.closeCell(container);
        }
    }
    

    Where I generate the corresponding input field if col1 < col2 and otherwise invoke closeCell for exiting edit mode.

    You can see it running here

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

Sidebar

Related Questions

I have data populated in a kendo grid gridDetails and i have another grid
I have created a kendo.data.dataSource with success, and I am able to bind it
I have a Kendo Grid in MVC4 that is working fine: Html.Kendo().Grid<SearchUserResultViewModel>() .Name(Grid) .Columns(columns
I have a Kendo UI Grid on my Razor Layout which fetches data from
I have a kendo ui grid. Let's say that the JS variable pointing to
I have a problem in binding JSON data to KENDO Pie Chart. I have
I have a Kendo UI datepicker with placeholder data. Here is the HTML: <input
I have a kendoUI grid. @(Html.Kendo().Grid<EntityVM>() .Name(EntitesGrid) .HtmlAttributes(new { style = height:750px;width:100%;scrollbar-face-color: #eff7fc; })
I have used kendo grid to show list of emails collected from the controller,
I'm using KendoUI Grid to show data. I have server paging working like a

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.