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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:57:09+00:00 2026-05-26T15:57:09+00:00

The rows of oTable datatable has unique ids. Why this code doesnt work? oTable.fnDeleteRow(

  • 0

The rows of oTable datatable has unique ids.

Why this code doesnt work?

oTable.fnDeleteRow(
    oTable.fnGetPosition(
        $('#row'+id+'-tr')));

the error is:

[18:10:44.631] nNode.nodeName is undefined @ http://localhost: ... /jquery.dataTables.js:1903

Thank you!

edit:

Example:

<table>
  <thead>
   <th>
    <td>Name </td>
    <td>Delete</td>
   </th>
  </thead>

  <tbody>
   <tr id="row0-tr">
    <td> Row 0 </td>
    <td> <Button onclick="deleteRow(0)"> - </td>
   </tr>

   <tr id="row1-tr">
    <td> Row 1 </td>
    <td> <Button onclick="deleteRow(1)"> - </td>
   </tr>

   <tr id="row2-tr">
    <td> Row 2 </td>
    <td> <Button onclick="deleteRow(2)"> - </td>
   </tr>

  </tbody>
</table>

edit 2:

The real problem is: How to get row of table using id?

The method fnGetPosition($('#row'+id+'-tr') isn’t returning row.

I put this code before calling fngetPosition: console.log($('#row'+id+'-tr')) and
returns: ({length:1, 0:({}), context:({}), selector:"#row1-tr"})

Thanks for help!

  • 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-26T15:57:10+00:00Added an answer on May 26, 2026 at 3:57 pm

    The answer:

    oTable.fnDeleteRow(
        oTable.fnGetPosition(
            document.getElementById('#row'+id+'-tr')));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have five rows in my table in html. Each row has only 1
Consider a dummy case: <h:form id=wrapperForm> <h:panelGroup id=rowsContainer> <h:dataTable id=rowsTable value=#{bean.rows} var=row > <h:column>
Replaces Question: Update multiple rows into SQL table Here's a Code Snippet to update
I use this: http://datatables.net/release-datatables/examples/api/select_row.html Here is function return selcted rows: function fnGetSelected( oTableLocal )
I have duplicate rows in several SQL Server tables but the IDs are different.
I have painted a checkbox against each row in my datatable using the following
def divideset(rows, column, value) split_function = nil if value.is_a?(Fixnum) || value.is_a?(Float) split_function = lambda{|row|
My rows in table is below. <table> <tr> <td>Site1</td> <td> <select class=countryList name=countryList onchange=toggleVisibility(this);>
Suppose a row (several rows) or table in database. Can I backup them, to
I want to remove rows from Excel with Delphi7 program. This throws an exception:

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.