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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:31:25+00:00 2026-05-28T07:31:25+00:00

I am using jqgrid and using the inline editing mode and can’t figure out

  • 0

I am using jqgrid and using the inline editing mode and can’t figure out how to return errors back to the client from server side validation rules

I use fluent validation on my serverside to validate before persisting to a database. This works great except I don’t see how to return errors when editing in inline mode. If I don’t persist the values to the databse, the client still shows the value which should be rejected.

What is the recommended way to return an error after someone commits an inline edit so you will get some popup on the client side showing the error and it will stay in edit state ?


NOTE: this image below is in response to Oleg’s comment and answer below

enter image description here

  • 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-05-28T07:31:26+00:00Added an answer on May 28, 2026 at 7:31 am

    The recommend way is to use any HTTP error code in the response on the submitting of wrong data and to return the error description in the body of the response. If you need some more specific action like displaying another dialog with the error information, setting of focus on a field, marking some fields with CSS class ‘ui-state-error’ or something like that you should use errorfunc callback function.

    If restoreAfterError is false the inline editing will be continued.

    UPDATED: I mention in comments that the server should produce the error message as the response. In case of ASP.NET MVC the default message is HTML text which you posted as the first picture. If you use HandleJsonExceptionAttribute which I described in my old answer the error message will be serialized as JSON, but it contains additional information which you don’t need to display (like the StackTrace). So you should use errorfunc parameter of editRow or saveRow to decode the server response. You can either use decodeErrorMessage from the already referenced answer or use the $.parseJSON function directly:

    errorfunc: function(rowid, res) {
        var errorText = $.parseJSON(res.responseText).Message;
        $.jgrid.info_dialog($.jgrid.errors.errcap,
            '<div class="ui-state-error">' + errorText + '</div>',
            $.jgrid.edit.bClose,
            {buttonalign: 'right'});
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jQgrid row is edited using inline editing mode. Pressing Enter sends data to server
I'm using jqgrid with inline editing , when the user gets to the last
I am using a jqgrid where I'd like to use inline editing and mask
I am using JqGrid with MVC 3. Some errors are handled in the server
jqGrid contains quantity column and add to cart button using colmodel below. Inline editing
How can I find the current page number in jqGrid (using jQuery of course).
I'm trying to use inline editing in jqGrid and I'm having trouble with the
I'm using jqGrid to build a custom inline entry widget on a page. The
I'm using jqgrid in a project. And need to know how to return/set error
I am using jqgrid throughout my application. On two screens with inline edit, everything

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.