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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:09:10+00:00 2026-05-19T09:09:10+00:00

I wondered if anyone else had come across this problem. When I originally build

  • 0

I wondered if anyone else had come across this problem. When I originally build my table in my view, I’m using a custom attribute (call it customerID) in each table row to hold information I’ll need to pass down for an ajax call. However, I’m also dynamically adding rows to the table, and I can’t figure out how to pass back that same information (customerID) to be put in an attribute for the row. Currently, the only thing I’m doing when adding rows is building an array of arrays of strings that map exactly to my columns. This works fine, but there’s no room to send back extra information.

I guess I don’t need to store that in an attribute, if there’s another way to send that information back to the view when adding rows. Does anyone have any ideas on this?

Thanks.

  • 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-19T09:09:10+00:00Added an answer on May 19, 2026 at 9:09 am

    I was able to solve this problem by using the plugin’s built-in functions to loop through the rows one by one. On the server, I created a private class that contained fields for all the information I need once I get back to the client. This includes actual values for the table cells, but also information to be placed in attributes. I create a list of these (one object = one row’s worth of info), serialize them, and send them back to the calling ajax method. The following code assumes I’ve received the serialized string of objects back, and I’m in JS:

    function(rowsToAdd) {
    
        var rowList = JSON.parse(rowsToAdd); // rows come back as object representations of table rows, with properties
    
        $.each(rowList, function(index, row) {
            var rowStringArray = [row.Prop1, row.Prop2, row.Prop3, row.Prop4];
            var rowPos = tableObject.fnAddData(rowStringArray); // add the row through the plugin, and receive the row's index in return
            var tableRowElement = tableObject.fnGetNodes(rowPos[0]); // get reference to <tr> element just added
    
            $(tableRowElement).attr('attributeINeeded', row.AttributeProp).attr('anotherAttributeINeeded', row.AttributeProp2);
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having the following problem and wondered whether anyone could see why this is
I know this is pretty silly but just wondered if anyone had a link
I'm using this simple slideshow and wondered if anyone knew how to make it
Wondered if anyone had any idea why the following problem is occurring, or had
I'm having a little trouble attacking this problem and wondered if anyone could push
Before I get too stuck in, I wondered if anyone had done this. All
I'm thinking of writing a new web-based game, and wondered if anyone had any
I've never really considered this question before and wondered if anyone has any advice
I'm running in to a couple of issues and wondered if anyone had any
I'm building something similar to this - http://www.impressivewebs.com/demo-files/content-switcher/content-switcher.html I wondered if anyone had any

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.