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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:39:44+00:00 2026-06-06T12:39:44+00:00

hi all i have jqgrid and set update inline . i wrote this code

  • 0

hi all i have jqgrid and set update inline . i wrote this code

 $(function () {

         var  localstr="2:Dolar;3:Pond;4:Rial";

 var rows;
            var lastSel;
            var grid = $('#list');



            grid.jqGrid({
                url: 'jQGridHandler.ashx',

                postData: { ActionPage: 'ClearanceCost', Action: 'Fill' },
                ajaxGridOptions: { cache: false },
                loadonce: true,
                direction: "rtl",

                datatype: 'json',
                height: 490,
                colNames: ['RequestId', 'WaybillNo', 'CostId', 'NameCost', 'Amount', 'CurrencyTypeId ', 'Remark'],
                colModel: [
                        { name: 'REQUEST_ID', width: 100, sortable: true, hidden: true },
                        { name: 'WAYBILL_NO', width: 100, sortable: true, hidden: true },
                        { name: 'COST_ID', width: 200, sortable: true, hidden: true },
                        { name: 'COST_NAME', width: 200, sortable: true },
                        { name: 'COST_AMOUNT', width: 100, sortable: true, editable: true },
                        { name: 'CURRENCY_ID', width: 100, sortable: true, editable: true, edittype: 'select', formatter: 'select', editoptions: {
                            value: localstr
                            //,



                        },
                        { name: 'REMARK', width: 200, sortable: true, editable: true }
                       ],

                gridview: true,
                rowNum: 30,
                rowList: [30, 60, 90],
                pager: '#pager',
                sortname: 'REQUEST_ID',
                viewrecords: true,
                sortorder: 'ASC',

                rownumbers: true,
                loadComplete: function () {

                    var $this = $(this);
                    rows = this.rows;
                    var l = rows.length, i, row;

                    for (i = 0; i < l; i++) {
                        row = rows[i];



                        var selRowId = grid.jqGrid('getGridParam', row.id);
                        console.log(selRowId);
                        console.log(grid.jqGrid('getCell', row.id, 'CURRENCY_ID'));

                        if ($.inArray('jqgrow', row.className.split(' ')) >= 0) {
                            $this.jqGrid('editRow', row.id, true);
                        }

                    }
                },
                editurl: "jQGridHandler.ashx"

            });
            grid.jqGrid('navGrid', '#pager', { add: true, edit: true, del: true }, {}, {}, {}, { multipleSearch: true, overlay: false, width: 460 });


            $("#btnsave").click(function () {
                var l = rows.length, i, row;

                for (i = 1; i < l; i++) {
                    row = rows[i];

//                    var $this = grid.jqGrid('getCell', row.id, 'COST_AMOUNT');
//                    var $id = $($this).attr("id");
//                    var COST_AMOUNT = $("#" + $id).val();


//                    console.log(grid.jqGrid('getCell', row.id, 'COST_ID'));
//                    $this = grid.jqGrid('getCell', row.id, 'COST_ID');
//                    $id = $($this).attr("id");
//                    var COST_ID = $("#" + $id).val();

                   alert(grid.jqGrid('getCell', row.id, 'CURRENCY_ID'));
//                    $this = grid.jqGrid('getCell', row.id, 'CURRENCY_ID');
//                    $id = $($this).attr("id");
//                    var CURRENCY_ID = $("#" + $id).val();

//                    $this = grid.jqGrid('getCell', row.id, 'REMARK');
//                    $id = $($this).attr("id");
//                    var REMARK = $("#" + $id).val();

//                    console.log(COST_ID + ",  " + COST_AMOUNT + ",  " + CURRENCY_ID + ",  " + REMARK);



                }

            });

        });

i want get CURRENCY_ID drop down list value when user clicked in btn, please help me. thanks all

EDIT01:

enter image description here

Mr Oleg i want design like this posted

thanks for help me

  • 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-06-06T12:39:46+00:00Added an answer on June 6, 2026 at 12:39 pm

    One can see that you use wrong order of the columns in JSON data. The text like “EURO” are in the third column, but you have the column in the grid in the 6-th place. One have to count all hidden columns too. Perhaps you need just change the order of the columns and move ‘WAYBILL_NO’ and ‘COST_ID’ in another place in colModel.

    Probably it was the error which you have?

    Additionally you should not forget to define all variables which you use. For example the lines

    var $this = $(this);
    rows = this.rows;
    

    should be fixed to

    var $this = $(this),
        rows = this.rows;
    

    which is the same as

    var $this = $(this), rows = this.rows;
    

    The current code do

    var $this = $(this);
    window.rows = this.rows;
    

    or produce an error in strict mode of JavaScript.

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

Sidebar

Related Questions

I have three classes that all have a static function called 'create'. I would
This is the first time I'm using jqgrid. I have confused in how to
I'm trying to get column reordering working in jqGrid 3.8.1, I have sortable set
In the past when I've used jqgrid all i have done is had a
We have a jqGrid that shows the search box above the grid at all
I have a JQGRid tree. It loads data click by click, not all at
I have two questions regarding built-in search feature of JqGrid. How to get all
I have JqGrid with RadioButton per each row like this. ... { name: 'select',
I have a jqGrid where I want all the rows to be in edit
I have a JQGrid with loadonce:true(so it's all client side) and paging enabled(with, say

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.