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

  • Home
  • SEARCH
  • 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 6376335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:43:52+00:00 2026-05-25T01:43:52+00:00

I have a checkbox column in my JqGrid which get loaded from DB, so

  • 0

I have a checkbox column in my JqGrid which get loaded from DB, so it is either checked or not checked when it is loaded.

What i want is : If checkbox is being checked or uncheked by user i want to update DB in at same. I dont want user to press enter or anything. only 1 click and send action to DB

name: ‘Aktiv’, index: ‘Aktiv’, width: 100, edittype: ‘checkbox’, align: ‘center’,formatter: “checkbox”, editable: true, formatoptions: {disabled : false}

  • 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-25T01:43:52+00:00Added an answer on May 25, 2026 at 1:43 am

    You can set a click event handler inside of loadComplete:

    loadComplete: function () {
        var iCol = getColumnIndexByName ($(this), 'Aktiv'), rows = this.rows, i,
            c = rows.length;
    
        for (i = 1; i < c; i += 1) {
            $(rows[i].cells[iCol]).click(function (e) {
                var id = $(e.target).closest('tr')[0].id,
                    isChecked = $(e.target).is(':checked');
                alert('clicked on the checkbox in the row with id=' + id +
                    '\nNow the checkbox is ' +
                    (isChecked? 'checked': 'not checked'));
            });
        }
    }
    

    where

    var getColumnIndexByName = function(grid, columnName) {
        var cm = grid.jqGrid('getGridParam', 'colModel'), i, l;
        for (i = 1, l = cm.length; i < l; i += 1) {
            if (cm[i].name === columnName) {
                return i; // return the index
            }
        }
        return -1;
    };
    

    Instead of the alert you should use jQuery.ajax to send information to the server about updating the checkbox state.

    You can see a demo here.

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

Sidebar

Related Questions

I have used checkbox column in gridview. I want to check status of that
I have a checkbox column bound to a dependency property. When editing the checked
I have a Checkbox template column in a ASP.NET 3.5 GridView. Now the user
I have a GridView in ASP.net where I have a CheckBox column. The user
I have a jqgrid with a checkbox column. when checkbox is pressed i need
In a jqgrid grid, I have a checkbox as first column and some other
I have a telerik MVC 3 grid, that contains checkbox column. if the user
I have a datagridview with a checkbox column at the beginning, what i want
T have used checkbox column in gridview. On click of a linkbutton, it should
I have a gridview that I have added a checkbox column using a templatefield

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.