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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:11:57+00:00 2026-05-29T09:11:57+00:00

I have grid with several editable cols colModel: [ { name: ‘id’, width: 1,

  • 0

I have grid with several editable cols

colModel: [
    { 
        name: 'id',
        width: 1,
        hidden: true,
        key: true,
        resizable: false
    },
    {
        name: 'name',
        editable: true,
        sortable: false,
        resizable: false
    },
    {
        name: 'name2',
        editable: true,
        sortable: false,
        resizable: false
    },
    treeGrid: true,
    treeGridModel: 'adjacency',
    ExpandColumn: 'name',

For some reason I’m needed to have some not editable cells in these cols

    loadComplete: function() {
        var ids = grid.jqGrid('getDataIDs');

        for (var i=0;i<ids.length;i++) {
            var id=ids[i];
            var row_data = $(this).jqGrid('getRowData', id);

            if (row_data.zzz > 0) {
                if (row_data.zzz > 1) 
                    grid.jqGrid('setCell',id,'name2','','not-editable-cell');
                else
                ...
            }
            else {
                grid.jqGrid('setCell',id,'name','','not-editable-cell');
                ...
            }
        }
    }

So some rows have both cells editable(name, name2), some only one (name or name2)

I don’t have any problems If I use editCell
But editRow doesn’t pay attention on not-editable-cell class

I’ve solved this problem by editing of jquery.jqGrid.src.js
I understend that it’s very bad way

$.jgrid.extend({
//Editing
    editRow : function(rowid,keys,oneditfunc,successfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc) {
.......
        return this.each(function(){
            var $t = this, nm, tmp, editable, cnt=0, focus=null, svr={}, ind,cm;
            if (!$t.grid ) { return; }
            ind = $($t).jqGrid("getInd",rowid,true);
            if( ind === false ) {return;}
            editable = $(ind).attr("editable") || "0";
            if (editable == "0" && !$(ind).hasClass("not-editable-row")) {
                cm = $t.p.colModel;
                $('td[role="gridcell"]',ind).each( function(i) {
///
                    if (!$(this).hasClass("not-editable-cell")) {
///
                    nm = cm[i].name;
                    var treeg = ($t.p.treeGrid===true && nm == $t.p.ExpandColumn) ? true : false;

Is it possible to solve this problem via formatter?

  • 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-29T09:11:58+00:00Added an answer on May 29, 2026 at 9:11 am

    The class "not-editable-cell" are really used only in the cell editing. The inline editing analyse "not-editable-row" call only. You can change the source code of jqGrid, but you will receive problems to maintain your custom changes after releasing of the new version of jqGrid. So the better way is to post you suggestion in the trirand forum.

    As a workaround you can use the trick which I described here and here. The idea is easy: you can temporary modify the editable property based on the cell contain. Directly after you call of editRow method you can reset editable property because the editing fields already created.

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

Sidebar

Related Questions

I have a Grid inside a Canvas defined like this: <Canvas x:Name=outerCanvas> <Grid Grid.Row=1
I have a grid with several thousand rows that can be filtered and sorted.
Have table and several div elements. Table is time grid and divs are events
I have a scenario where I have several jqgrids. Clicking row in one grid
i have a grid divided into several rows/columns, how can i get the canvas
I have a WPF User Control with a UIElement Grid with several text boxes
I have several tables whose relationships are based upon unique key constraints. A quick
I have a grid that contains several smaller images that are overlayed by a
I am using the telerik ASP.NET MVC Grid template and currently have several check
I have a custom GridView like control made of a Grid panel with several

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.