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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:23:52+00:00 2026-06-13T21:23:52+00:00

I have implemented inline editing with Knedo UI MVC grid with Ajax binding, Server

  • 0

I have implemented inline editing with Knedo UI MVC grid with Ajax binding,
Server side validation handled in controller and sending the error back using –

ModelState.AddModelError(“Error: “, ex.Message);

@(Html.Kendo().Grid<AnalyticsServiceWeb.ViewModel.SomeViewModel>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Name);
columns.Bound(p => p.Path);
columns.Bound(p => p.Space);
columns.Command(command => { command.Edit(); command.Destroy(); });
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
)

function error_handler(e) {
    if (e.errors) {
        var message = "Errors:\n";
        $.each(e.errors, function (key, value) {
            if ('errors' in value) {
                $.each(value.errors, function () {
                    message += this + "\n";
                });
            }
        });
        alert(message);
    }
}

The server side error message is getting displayed when there is a server side exception, but it still completes the action in UI, i mean it adds the new record to the grid and update as well even though there is server side exception.

Is there any way to retain the state of UI before the action start?, it supposed to work in that way, not sure if i am missing anything?

Thanks in advance

  • 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-13T21:23:53+00:00Added an answer on June 13, 2026 at 9:23 pm

    Kendo UI Supports (Most) Data Annotations in your View Models this will give you client side unobtrusive validation provided by Kedno UI and you can implement server side validation by looking at the ModelState

    So doing this in your Controller Action will handle server side validation

    If(ModelState.IsValid)
    {
       //Write to the Database
    }
    else
    {
       //We Have Validation Error, return the model for correction
    }
    

    Here goes some examples

    [Required]
    [DataType.Currency]
    public decimal Currency { get; set; }
    

    This tells the gird the Currency Field is Requried (Obviously) but something even cooler than that is Kendo Grid will render its currency text box automatically when editing

    It will do the same for Dates and Times so this will render its Date Picker

    [Required]
    [DataType.Date]
    public decimal Date { get; set; }
    

    To display server side validation errors try this:

    The key of the error holds the name of the field. You could use it to generate a message which includes the property names for the errors e.g.

    $.each(e.errors, function (key, value) {
        if ('errors' in value) {
            message += key + ":\n";
            $.each(value.errors, function () {
                message += this + "\n";
            });
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a wpf application and i have to implement inline editing
I’m working on a homepage and will use an AJAX inline editing script for
I have implemented my webpage menu by inline li-s of ul. li has a
I have implemented my webpage menu by inline li -s of ul . li
I have implemented a caption solution for shadowbox which uses the 'rev' inline tag.
i starter in jqgrid, i want implement inline edit in jqgrid i have this
I have implemented correctly bump's api, and added this code: - (void) configureBump {
I have implemented pagination to my data, but the problem is I only have
I have implemented a table view with multiple threads. Currently when a user taps
I have implemented a test method with Jersey to run on my Google AppEngine

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.