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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:20:08+00:00 2026-05-25T00:20:08+00:00

I have a jqgrid with a checkbox column. when checkbox is pressed i need

  • 0

I have a jqgrid with a checkbox column. when checkbox is pressed i need to update database.

I can retrieve id from my jqgrid, but when I’m sending it further to my controller I retrieve id = null

here is the code in load complete function

       var iCol = getColumnIndexByName($(this), 'Aktiv'), rows = this.rows, i,
           c = rows.length;

       for (i = 0; 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'));


               $.ajax({
                       mtype: "POST",
                       url: '@Url.Action("Action")',
                        data: { actionparameter: id },
                       contentType: "application/json; charset=utf-8",
                       dataType: "json",
                       async: false,
                       cache: 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-25T00:20:08+00:00Added an answer on May 25, 2026 at 12:20 am

    if alert shows not null for the id you should verify your server code. Depend on your configuration you could need to use JSON.stringify method from json2.js like

    data: JSON.stringify({actionparameter: id})
    

    or just do no JSON specific prameters in the $.ajax call.

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

Sidebar

Related Questions

I have a checkbox column in my JqGrid which get loaded from DB, so
I have a case where I need to update a jqgrid based on some
I have a jqgrid where the database table has a few thousand rows, but
I need help with filtering rows from jqgrid. I have a grid with large
In a jqgrid grid, I have a checkbox as first column and some other
I have a jqGrid on a page and users can click a button to
I have a couple of columns in jqGrid with edittype=select. How can I read
I have seen the following demo with frozen column and filter toolbar here: http://www.ok-soft-gmbh.com/jqGrid/FrozenColumns.htm
Here's a simple question. I have a jqGrid that's working great but I want
I have a jqgrid with data loading from an xml stream (handled by django

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.