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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:34:48+00:00 2026-06-15T17:34:48+00:00

I am new to jquery and datatable. I have developed the editable datatable for

  • 0

I am new to jquery and datatable.
I have developed the editable datatable for “contacts”, where each row represents a contact.
Each “contact” has some “actions” associated with them.

When the user clicks on a particular “contact” the associated “actions” are displayed as additional rows under that particular contact.

Now I want to make both the “contact” row and the “action” rows editable. I have used “jEditable” plugin and can get the “contact” row as editable and not the “action”.
Any idea, or help will be greatly appreciated.

userInfo = "<table id='mycontacttable'><thead><tr><th></th><th>FirstName</th><th>FamilyName</th></tr></thead><tbody> ";
              /*constructing the Contact table, at this stage without the actions.*/
              for(i =0 ; i < response.result.length ; i++){
                  var contactid=response.result[i].contactID;
                  userInfo += "<tr><td>"+ 
                  "<img src=\"../javascript/datatables/media/images/details_open.png\" rel="+contactid+" alt=\"expand/collapse\"></td>"+
                  "<td>"+ response.result[i].givenName + "</td><td>" + response.result[i].familyName+"</td></tr> ";
              }
              userInfo +=  "</tbody></table> ";



              $('#info').html("The following are your contacts. " + userInfo);

              /*setting the sortable and unsortable columns*/
              oTable= $('#mycontacttable').dataTable({
                  "iDisplayLength": 25,

                  "bSort": true,

                  "aoColumns": [ 
                                { "bSortable": false },//Disable sorting on this column
                                null,
                                null

                                ]
              }).makeEditable();


              /*clicking a particular row in the table mycontacttable, and assigning the click event*/
              $('#mycontacttable tbody td img').live("click",function () {

                  var nTr = this.parentNode.parentNode;
                    if (this.src.match('details_close')) {
                        /* This row is already open - close it */
                        this.src = "../javascript/datatables/media/images/details_open.png";
                        oTable.fnClose(nTr);
                    }
                    else {
                        /* Open this row */
                        this.src = "../javascript/datatables/media/images/details_close.png";
                        var contact_id = $(this).attr("rel");/*contact id of a particular row that is clicked is stored in the variable contact_id*/

                        /*creating a sub table*/
                        action_sub_table = "<table id='submycontacttable'>"
                        for(i =0 ; i < response.result.length ; i++){
                              var contactid=response.result[i].contactID;
                              if(contact_id==contactid){
                                /*Iterating through each action of the contact, and constructing a sub table row for it*/
                                    for(count=0;count<response.result[i].actionSet.length;count++){
                                        action_sub_table += "<tr><td>"+response.result[i].actionSet[count].actionID+" </td><td>"+
                                                               response.result[i].actionSet[count].actionDueDate+"</td><td>" +
                                                            response.result[i].actionSet[count].actionNote+"</td></tr>";

                                    }   
                              }
                        }
                        action_sub_table +="</tablr>"; /*Construction of the subtable complete*/

                        oTable.fnOpen(nTr, action_sub_table, "info_row" );
                    }

                });
  • 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-15T17:34:49+00:00Added an answer on June 15, 2026 at 5:34 pm

    you can try jqGrid instead, I suppose that would be perfect in your case http://www.trirand.com/blog/

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

Sidebar

Related Questions

I am using jQuery datatables to display some data. Each row has an edit
I am new to jQuery. I have PrimeFaces dataTable. when it is converted to
I have application that brings response via Ajax and creates 5-20 new jQuery click
I have a rich:dataTable . I want to hide a row with this code:
I am fairly new to jQuery and JSON and have run into a problem
I am new to Jquery Datatables. I have managed to create a table and
I'm really new at javascript and JQuery and I'm using JQuery datatables. I have
I have never worked on jquery but after some googling and learning I have
I have built a function using jQuery to insert into a table a new
I have bound a KnockOut observableArray to a jQuery DataTable. When I dynamically add

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.