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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:24:27+00:00 2026-05-22T15:24:27+00:00

I have the below code in my jqgrid <script type=text/javascript> jQuery(document).ready(function() { var grid

  • 0

I have the below code in my jqgrid

<script type="text/javascript">
    jQuery(document).ready(function() {

        var grid = jQuery("#list");
        $("#editBtn").click(function() {
           alert("hi");                            });


        jQuery("#list").jqGrid({
            url: '<%= Url.Action("DynamicGridData") %>',
            datatype: 'json',
            mtype: 'POST',

            colNames: ['checkbox',  'Id','col1','col2' ],
            colModel: [
      { name: 'checkbox', index: 'checkbox', sortable: false, formatter: "checkbox", formatoptions: { disabled: false }, editable: true, edittype: "checkbox" },
               { name: 'Id', index: 'Id', search: false, stype: 'text', sortable: true, sorttype: 'int', hidden: true },
      { name: 'col1', index: 'col1', search: false, stype: 'text', sortable: true, sorttype: 'int', search: false, hidden: true },
      { name: 'col2', index: 'col2', sortable: true, search: false, width: 30, stype: 'int' } ],
            pager: jQuery('#pager'),
            rowNum: 40,
            rowList: [20, 40, 60, 100],
            sortname: 'Id',
            sortorder: 'asc',
            gridview: true,
            autowidth: true,
            rownumbers: true,
            viewrecords: true,
            toppager: true,
            height: "100%",
            width: "100%",
           caption: 'Grid Data'
        });



    });

I can fire the test alert in the editBtn function, how can a user access the id column of the records that have their checkboxes selected by the user?

  • 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-22T15:24:28+00:00Added an answer on May 22, 2026 at 3:24 pm

    use the following code to get the Id column data of which checkboxes are ticked…

    var grid = jQuery("#list");
    $("#editBtn").click(function() {
       var str = '';
       var data = grid.getRowData();
       for(i=0;i<data.length;i++){
            if(data[i].checkbox==='Yes')
                str += data[i].Id+',';
       }
       alert(str);
    });
    

    str variable consists of the values of Id column for which checkbox is selected by user.

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

Sidebar

Related Questions

I have example of code below. <script type=text/javascript src=assets/scripts/somescript.php>. </script> So, will my browser
I am using JQuery and I have below code. $(#departure_city).change(function() { $.ajax( { type:'post',
I met an interesting issue about C#. I have code like below. List<Func<int>> actions
I have below a list of text, it is from a popular online game
I am using c# and jQuery. I have below code where I am setting
I have below string in javascript var output = '<?xml version=1.0 encoding=UTF-8 standalone=yes?><abc><xyz><xyzResponse><URL>http%3A%2F%2Flocalhost%3A8080%2Fnet%2Fxyz.do%3Fpartner%3Ddummy%26id%3Dba0e245f-ae67-40b6-986d-3242acea4c04</URL><StatusMsg>SUCCESS</StatusMsg><ID>hello.com</ID><AID>test</AID></xyzResponse></xyz></abc>'; I
I have the below code which prints out lines of text as long as
I have the below code in stdafx.h. using namespace std; typedef struct { DWORD
Okay so I have a scenario similar to the below code, I have a
The code I have pasted below is meant to display images on the middle

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.