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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:35:17+00:00 2026-05-23T12:35:17+00:00

I defined inline-editing for my grid, which contains some checkbox columns, and it works

  • 0

I defined inline-editing for my grid, which contains some checkbox columns, and it works fine.
I set the 'navGrid' option to edit: true, and I get the nice pencil icon and a form is opened when I press it.
the problem is- I define the value property of the column like so: value: 'true:false' , which works fine for in-line editing (the generated input element:
<input type="checkbox" disabled="disabled" offval="no" value="false"> ),
but in form edit mode, the generated input is:

<input id="isadministrator" class="FormElement" type="checkbox" checked="" value="true:false" offval="false" name="isadministrator" role="checkbox">

which causes the checked value to be posted to server as ‘true:false’.
any ideas?
attached is my whole grid code:

$("#grid").jqGrid({
        url: 'SampleScriptService.asmx/GetGridData',
        datatype: 'json',
        ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
        serializeGridData: function (postData) {
            //with ASP.Net services, all parameters must be set in the post request.
            //so here we make sure that all the parameters that the web service expects are prensent. if not- we create them with null value.
            if (!postData.username) {
                postData.username = null;
            }
            if (!postData.fullname) {
                postData.fullname = null;
            }

            if (!postData.isadministrator) {
                postData.isadministrator = null;
            }
            return JSON.stringify(postData);
        },
        mtype: "POST",
        jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", records: "d.records", total: "d.total" },
        colNames: ['Username', 'Full Name', 'Administrator?', 'Password'],
        colModel: [
            { name: 'username', key: true, index: 'username', jsonmap: 'Username', 
                editable:false , edittype:'text'
            },
            { name: 'fullname', index: 'fullname', /* width: 90,*/
                editable:true, edittype:'text',
                jsonmap: 'FullName' },
            { name: 'isadministrator', index: 'isadministrator', formatter: 'checkbox', sortable: false,
                editable: true, edittype: 'checkbox', editoptions: { value: 'true:false' },
                stype: 'select', searchoptions: { value: 'none:All;true:Yes;false:No' }
                /*, width: 80*/, jsonmap: 'IsAdministrator' },
            { name: 'password', index: 'password'
                /*, width: 150*/,
                editable: true, edittype: 'password',
                formatter: function (cellvalue, options, rowObject) {
                    //never display anything in the password column
                    return '';
                },
                jsonmap: 'Password', search: false }
             ],
        rowNum: 2,
        pager: '#pager',
        viewrecords: true,
        sortname: 'username',
        caption: "Users Management",
        onSelectRow: function (id) {
            if (id && id !== currentlyEditedRowId) {
                jQuery('#grid').restoreRow(currentlyEditedRowId);
                currentlyEditedRowId = id;
            }
            jQuery('#grid').editRow(currentlyEditedRowId, true);
        },
        editurl: "SampleScriptService.asmx/UpdateUser"
    }).jqGrid('navGrid', "#pager", { edit: true, add: true, del: false, search: false })
        //add toolbar searching
    .jqGrid('filterToolbar', {});
  • 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-23T12:35:17+00:00Added an answer on May 23, 2026 at 12:35 pm

    @Dizzy Bryan High made a suggestion which is a very reasonable workaround.
    since I didn’t want to give up the checkboxes, I ended up just implementing a JQgridParseBool() method on server side, which handles the wrong value sent.
    Yep, it’s quite ugly, but I couldn’t find any other way around it.

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

Sidebar

Related Questions

I'm using the built-in 'action' formatter to edit inline (row editing) and to delete.
Non inline function defined in header file with guards #if !defined(HEADER_RANDOM_H) #define HEADER_RANDOM_H void
I have an inline member function defined under class MyClass int MyClass::myInlineFunction(); This function
I'm trying to get my UiBinder-defined widget to display inline, but I can't. My
Can inline function be declared in .h and defined once in .c?
The linker is reporting multiply defined errors for an inline function. I have the
As I know, C inline function body should be defined in .h file because
I am trying to use this library that allows for inline table editing, and
I have a static inline function defined in an H file, and at one
I have a inline function defined as following: inline string Change(char *pointer) { string

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.