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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:26:42+00:00 2026-06-18T06:26:42+00:00

I am using Jquery DataTable Grid . Here I am Making cells edit as

  • 0

I am using Jquery DataTable Grid.
Here I am Making cells edit as in :
this Example.

Now If the column ‘Engine version’ has value “420”, Then i want to make the whole row read-only.

Please help me out.

Edit:

  var oTable;
        $(document).ready(function () {
          oTable=  $('#example').dataTable({
                "bProcessing": false,
                "bJQueryUI": true,
                "sAjaxSource": "GetWebAlerts.aspx",
                "sPaginationType": "full_numbers",
                "aLengthMenu": [ 10,25,50,100,200,500 ],
                 "fnDrawCallback": function (oSettings) {
                   if (oSettings.bSorted || oSettings.bFiltered) {
                    if (oSettings.aoColumns[1].bVisible == true) {
                        for (var i = 0, iLen = oSettings.aiDisplay.length; i < iLen; i++) {
                            $('td:eq(0)', oSettings.aoData[oSettings.aiDisplay[i]].nTr).html(i + 1);
                        }
                    }
                }
            },
                "aaSorting": [[3, "desc"]],
                aoColumns: [
                 { "bVisible": false, "bSortable": false, "aTargets": [0] },
               {"sClass" : "left", "bVisible": true, "bSortable": false, "aTargets": [1] },
                 { "bVisible": true, "bSortable": true, "aTargets": [2] },
                 { "bVisible": true, "bSortable": true, "aTargets": [3] },
                 { "bVisible": true, "sType": "num-html","bSortable": false,
                    "fnRender": function (oData, sVal) {

                        if (sVal.indexOf("OVERSPEED") >= 0) {                            
                       return "<span title='Overspeed = " +  oData.aData[8] + " KM/H'>" + sVal + "(" + oData.aData[8] +" KM/H)</span>";                                                        
                       }
                        else if (sVal.indexOf("IDLING") >= 0) {
                            return "<span title='Idling from = " + oData.aData[8].split(";")[0] + " For "+ oData.aData[8].split(";")[1] + " Mins'>" + sVal + "("+ oData.aData[8].split(";")[1]+  " Mins)</span>";
                            }
                         else if(sVal.indexOf("Geofence In") >= 0)
                         {
                            return "<span>" + oData.aData[8] + "- IN</span>";
                         }
                          else if(sVal.indexOf("Geofence out") >= 0)
                         {
                            return "<span>" + oData.aData[8] + "- OUT</span>";
                         }
                        else { 

                        return sVal;                              
                         }
                    }, "aTargets": [4], "asSorting": ["desc", "asc"] },

               { "bVisible": true, "bSortable": true, "aTargets": [5] },
                 { "bVisible": true, "bSortable": true, "aTargets": [6] },
                   { "bVisible": true, "bSortable": true, "aTargets": [7] }

                     ]

                 }).makeEditable({
                                    sUpdateURL: "UpdateWebData.aspx?i=0",
                                    "aoColumns": [
                                         null,
                                           null,
                                           null,
                                           null,

                                           {
                                             indicator: 'Saving reason...',
                                             tooltip: 'Click to select reason',
                                             loadtext: 'loading...',
                                             type: 'select',
                                             onblur: 'submit',
                                             data: "{'1':'Accident','2':'Battery Taken Out','3':'In Workshop','4':'Not In Operation','5':'Signal Lost','6':'Other'}"                                                

                                           },


                                           {

                                           },
                                            null
                                     ],
                                       sDeleteURL: "UpdateWebData.aspx?i=1",
                                       oDeleteRowButtonOptions: {   label: "Remove", 
                                                icons: {primary:'ui-icon-trash'}
                                    },

                                });
                           });

This is my code.. I want to make readonly if the 5th number Json data from my page GetWebAlerts.aspx is “0”.

  • 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-18T06:26:43+00:00Added an answer on June 18, 2026 at 6:26 am

    With out looking at your code I’ll try to explain how I would go about doing this.

    In the JS where they enter the value, check if the input is engine version, and the value is 420.
    If it is, add a class to that row called 420row.

    Then in the function where it binds the on click to change to input, change the selector to add :not('.420row').

    Again, if you post your code, or better yet make a jsfiddle, then I’ll be able to help you out better.

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

Sidebar

Related Questions

I am using JQuery with the DataTable plugin, and now I have a big
I am using jQuery dataTables version 1.9.2 Table is created with class datatable and
I am using jQuery datatables to display some data. Each row has an edit
I have a column with buttons in a table I'm using jQuery datatable plugin.
I'm using jQuery DataTable to form a table out of this data.txt: { aaData
I am using this jquery datatable plugin to display information from database. My table
I am using jquery datatable and my html table's one of the column contains
I am using jQuery datatable server side processing. Now I want to change the
I am using jquery data tables server side method example here http://www.datatables.net/examples/server_side/server_side.html My JSON
I am using jQuery's datatable and I occasionally toggle the visiblity of some of

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.